Thanks for the link. I didn't catch the following line first time i read it : Caching is not used when the data cache does not have any cached data for an id in a query result.
So in Open JPA, query cache is active if all resulting entities from thje query are themselves cacheable (i.e. annotated with @Cacheable). This makes a cacheable query hint unnecessary with OpenJPA then. Thanks once more for the clarification and sorry for the noise. ----- Mail original ----- De : Jesse Farinacci <[email protected]> À : [email protected]; Adrian Gonzalez <[email protected]> Cc : Envoyé le : Mercredi 23 janvier 2013 15h51 Objet : Re: Portable way to use query cache Greetings, On Wed, Jan 23, 2013 at 4:38 AM, Adrian Gonzalez <[email protected]> wrote: > I'm a newbie with openJPA, I would like to know what's the best way to do > query caching (in a JPA 2.x portable way). > My webapp will run on JBoss 7.x (Hibernate) and Websphere 8 (OpenJPA). http://openjpa.apache.org/builds/2.2.1/apache-openjpa/docs/ref_guide_caching.html -Jesse -- There are 10 types of people in this world, those that can read binary and those that can not.
