openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henno Vermeulen <>
Subject RE: FetchGroup and EhCache Datacache
Date Thu, 06 Nov 2014 11:33:32 GMT
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).

-----Oorspronkelijk bericht-----
Van: Gerald Barker [] 
Verzonden: dinsdag 4 november 2014 14:29
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.


View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message