Yes we did not turn on JPA caching exactly for this reason. We made a few unit tests that verify consistency with multiple fetchplans and they fail when turning on the cache.
That's a smart thing to do, consistency is more important than a small performance gain. Once you add caching you will also need a strategy to clear stale data from the cache which can be a pain to program. We have a client-server application and use caching on the client side and do not use caching at the server side, except for the user objects that need to be verified regularly for security. (We solved this using ehcache/Spring @Cacheable annotations on a user DAO method that uses one fetchplan only). Regards Henno -----Oorspronkelijk bericht----- Van: Gerald Barker [mailto:gerald_bar...@psfc.coop] Verzonden: dinsdag 4 november 2014 14:29 Aan: users@openjpa.apache.org Onderwerp: RE: FetchGroup and EhCache Datacache Yes, this will work; don't get the JPA magic, but you get consistent results. Did you turn off JPA caching for all model object (tables); Most of our tables the setup in the annotations is correct. Anyway, I will not use caching until it appears I need it and then I will implement something like this. Thanks -- View this message in context: http://openjpa.208410.n2.nabble.com/FetchGroup-and-EhCache-Datacache-tp7587348p7587360.html Sent from the OpenJPA Users mailing list archive at Nabble.com.