Thanks for your explaination > (a) require more discipline from the users in assigning cache groups and > (b) disallow multiple cache groups per key (be it for the same query instance > or for different, but equivalent query instances).
But surely this is something the enduser aka Cayenne-user will not have to deal with it right? In my imagination I choose "EHCache" from the modeler and Cayenne is doing everything for me. > > > On Jul 28, 2011, at 12:01 AM, Andrus Adamchik wrote: >> 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 >> >> >> >> > > -- http://www.grobmeier.de