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



Reply via email to