Changes between Version 3 and Version 4 of TracDev/CacheManager
- Timestamp:
- Apr 17, 2014, 4:16:11 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/CacheManager
v3 v4 33 33 }}} 34 34 35 * If more control is needed, for example to invalidate an attribute within an existing transaction, the attribute should be decorated with the '''`@cached`''' decorator. Accessing the attribute then yields a proxy object with two methods, `get()` and `invalidate()`, taking an optional `db` argument. For example, this is used in the case of ticket fields to invalidate them in the same transaction as e.g. an enum modification.36 37 35 * The cache is '''consistent within a request'''. That is, a cached attribute will always have the same value during a given transaction. Obviously, cached values should be treated as immutable. 38 36