Changes between Version 9 and Version 10 of TracDev/Proposals/CacheInvalidation
- Timestamp:
- Mar 20, 2009, 12:10:38 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/Proposals/CacheInvalidation
v9 v10 141 141 Do you see a better way to do it? 142 142 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 143 150 == Idea 2: Cache control == 144 151