cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: [jira] [Commented] (CAY-1595) EHCache implementation of Provider<QueryCache>
Date Wed, 27 Jul 2011 21:01:34 GMT

On Jul 27, 2011, at 11:39 PM, Christian Grobmeier wrote:

> What is the difference to Cache-Groups then?

(Also see my other email on this) 

The difference is subtle, but may be essential in some scenarios. OSCache cache groups are
"tags" that can be applied to any combinations of cache keys (including multiple groups per
key). E.g. on a certain event you may invalidate group1, and on some other event - group2,
and these two groups may span over overlapping (but not equivalent) sets of keys. 

Using EhCache instances to emulate cache groups implies a hierarchy. All keys belong to either
zero or one cache group. Now the user must ensure that 2 queries with the same cache key,
but created in different places of the code are using the same group. 

This is not the end of the world of course, and I must admit that most often than not queries
are actually organized this way already. 

Andrus




Mime
View raw message