You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Gary Jarrel <ga...@gmail.com> on 2011/09/12 13:29:44 UTC

Cayenne 3.1 & Caching under Lifecycle

Hi All,

Going though the 3.1 code again, and notice the CacheGroups annotation
and CacheInvalidationFilter class for invalidating cache.

Question is, will this become a standard for invalidating cache in
Cayenne, or are these just examples of what can be achived with
DataChannelFilter and it's up to the developer to use them or not.

Reason I asked is that I had something similar in one of my projects
using annotations and callbacks, so I am thinking whether to replace
our code with these.

The one other thought that crossed my mind (and we used) is that our
annotation also allowed setting the Cache Strategy, so before
executing a query for a certain Data Object we could check the
annotation and alter the query's cache strategy accordingly.

Cheers,

garyj

Re: Cayenne 3.1 & Caching under Lifecycle

Posted by Andrus Adamchik <an...@objectstyle.org>.
The status of cayenne-lifecycle module is very experimental. We add utilities there that we don't want to see in the core because we don't want to commit to supporting them 3 major releases from now. So use at your own risk ;)

Having said that, it is all based on core API's that we are definitely going to support once 3.1 goes out of Alpha.

Andrus


On Sep 12, 2011, at 2:29 PM, Gary Jarrel wrote:
> Hi All,
> 
> Going though the 3.1 code again, and notice the CacheGroups annotation
> and CacheInvalidationFilter class for invalidating cache.
> 
> Question is, will this become a standard for invalidating cache in
> Cayenne, or are these just examples of what can be achived with
> DataChannelFilter and it's up to the developer to use them or not.
> 
> Reason I asked is that I had something similar in one of my projects
> using annotations and callbacks, so I am thinking whether to replace
> our code with these.
> 
> The one other thought that crossed my mind (and we used) is that our
> annotation also allowed setting the Cache Strategy, so before
> executing a query for a certain Data Object we could check the
> annotation and alter the query's cache strategy accordingly.
> 
> Cheers,
> 
> garyj
>