I have been working in the last few weeks on refactoring the various in-memory caches (wiki page names, InterMapTxt, ticket fields) into a generic caching and cache control infrastructure. Its main features are the following:
- The caching, data retrieval and invalidation logic is centralized in the CacheManager component. No separate re-implementation for each additional cache. - Caching a Component attribute is as simple as tagging a data retrieval method with the @cached_value or @cached decorator. No worries about locking, transactions, ... - Cache invalidation is fine grained, whereas we would previously trigger an environment reload with config.touch(). The complete details, as well as the patch against the current trunk, are available here: http://trac.edgewall.org/wiki/TracDev/Proposals/CacheInvalidation I have already integrated lots of feedback from Christian, and I would like to proceed with merging this to trunk. But before doing so, I would like to ask here for any extra feedback people may have. If nothing pops up in the next few days, I'll commit to trunk and update the documentation. -- Remy
signature.asc
Description: OpenPGP digital signature
