[jboss-user] [JBoss Cache: Core Edition] - Re: JPA/Hibernate JBC usage

zeravlai do-not-reply at jboss.com
Mon Mar 30 13:11:34 EDT 2009


I'm gonna answer my own question but I still need clarification:

1.- Entity caching is done by configuring  <property name="hibernate.cache.use_query_cache" value="true"/>
in persistence.xml. The cache will start showing up entities, but entities will never be accessed from the cache (this is the point that i need to clarify).

2.- If besides the above, the entity is configured with the HINT @QueryHint(name="org.hibernate.cacheable",value="true"),  then queries will also be cached, and if a query is repeated, results will be retrieved from cached.

It seems caching entities don't make any sense if query caching is not enabled. Is it that way?

Thanks a lot !!

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222080#4222080

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222080



More information about the jboss-user mailing list