Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add support for cache group callbacks #854

Closed
dzuelke opened this Issue · 3 comments

1 participant

@dzuelke
Owner

```xml someMethodName ```

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)
@dzuelke
Owner

(In 486fbbe64fff1d79c5f0b9903e26a7a6aa5b91d1) added support for cache group callbacks, closes #854. check out the ticket for details, guys, many of you will find this very useful

@dzuelke
Owner

Issue closed

@dzuelke
Owner

FYI, you need to throw an exception of class AgaviUncacheableException to suppress caching altogether (implemented in 437443b, see #1032 for details)

@dzuelke dzuelke was assigned
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.