Changes between Version 1 and Version 2 of TracDev/CacheManager
- Timestamp:
- Apr 17, 2014, 3:18:43 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/CacheManager
v1 v2 19 19 == The Cache Manager == 20 20 Starting with Trac [milestone:0.12] (more precisely r8071), we introduced a !CacheManager component. 21 That component is mostly transparent to the end developer, which only has to deal with two decorators21 That component is mostly transparent to the end developer, which only has to deal with a decorator 22 22 that can be used to create ''cached attributes''. 23 23 24 * '''Creating a cached attribute''' is done by defining a retrieval function and decorating it with the '''`@cached _value`''' decorator. For example, for the wiki page names:24 * '''Creating a cached attribute''' is done by defining a retrieval function and decorating it with the '''`@cached`''' decorator. For example, for the wiki page names: 25 25 {{{ 26 26 #!python 27 @cached _value27 @cached 28 28 def pages(self, db): 29 29 """Return the names of all existing wiki pages."""