Ticket #854 (closed enhancement: fixed)
Add support for cache group callbacks
|Reported by:||david||Owned by:||david|
|Severity:||normal||Keywords:||caching group callback condition|
That method is called on the Action instance, and can do either of two things:
- return a scalar value (then used as the cache key for that group)
- throw an exception
If the method throws an exception, then no caching will occur.
Some examples of when callbacks are useful:
- you want different caches for the product depending on whether or not the current user is, say, the owner of the item (because you show more info to the owner, or edit buttons etc)
- you don't want to cache at all if, say, the account owner visits his/her own profile (you simply throw an exception then)
Note: See TracTickets for help on using tickets.