Edgewall Software

Changes between Version 9 and Version 10 of TracDev/Proposals/CacheInvalidation


Ignore:
Timestamp:
Mar 20, 2009, 12:10:38 AM (15 years ago)
Author:
Remy Blank
Comment:

A possible solution to the CachedRepository case.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/Proposals/CacheInvalidation

    v9 v10  
    141141Do you see a better way to do it?
    142142
     143 - Yes, by instantiating `CacheProxy` in the constructor and storing it as an instance attribute. This gives it the same interface as if `@cached` was used.
     144{{{
     145#!python
     146    self.metadata = CacheProxy('CachedRepository.metadata:' + self.name, self.get_metadata, env)
     147}}}
     148   This does indeed require `env`, and changing that will make the `CachedRepository` unit tests a bit more complicated :-/
     149
    143150== Idea 2: Cache control ==
    144151