Ticket #854 (closed enhancement: fixed)
Add support for cache group callbacks
| Reported by: | david | Owned by: | david |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.0 |
| Component: | filter | Version: | |
| Severity: | normal | Keywords: | caching group callback condition |
| Cc: | Patch attached: | no |
Description
<group source="callback">someMethodName</group>
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)
Change History
Note: See
TracTickets for help on using
tickets.

