>> There may be some difficulties with this because EHCache unlike OSCache >> doesn't have support for cache groups which Cayenne actively uses. As I've >> searched this is a major problem for all users migrating from OSCache to >> EHCache and EHCache even has Jira for it: >> https://jira.terracotta.org/jira/browse/EHC-240 . > > Oops. Now I am starting to remember why we picked OSCache against EHCache for > Cayenne in the first place... Yeah, seems like OSCache is unique in respect > to "cache groups" feature.
Isn't this the feature you are describing? http://ehcache.org/documentation/samples.html#Using_Caches Cache cache = manager.getCache("sampleCache1"); Element element = cache.get("key1"); If these are the groups you mean (they call it cache simply) then there might be a chance to bridge this. You could get the cache and iterate over all elements. If they have no "getAllElements" method, maybe we can extend this class > > After a quick repeat look at EhCache after many years, it is definitely > pretty advanced (I am surprised it doesn't support groups considering > everything else it supports) and I see a bunch of things that I like. E.g. > multiple caches per CacheManager allows to split cache into regions which > seems suitable to serve for unified cache approach between object and query > caches (something that's been on the list for some time). And IIRC this is > how Hibernate does it. What is the difference to Cache-Groups then? >> The question is should we wait for EHCache to implement cache groups or >> write our custom solution for this? (or maybe something else) Actually I think in the times of the cloud several options for caching are important. Hibernate has 5 or 6 options for caching. Cayenne does only have a cache which is not developed anymore (it would be cool if it would go to the asf, like ognl) >From marketing perspective - +1 > Good question... From the Jira history, this issue has been shifted around > for 2 years by Terracotta, so it is hard to tell when it becomes standard. All the other big frameworks deal with it - so there is no need to change it. I ssaw there is even a patch ready. > P.S. Also after joining Terracotta, EhCache became sneaky spyware: > http://adammonsen.com/post/512 Big surprise :-/ This is very sad :-( Cheers