Joined: Wed Jan 21, 2004 12:36 pm Posts: 1
|
Section 12.4 of the Hibernate docs talks about the Query cache and it's usefulness in caching frequently run queries. I have specified the following properties in the session-factory configuration files:
hibernate.cache.use_query_cache = true
hibernate.cache.provider_class = org.mitre.cache.HibernateTangosolCacheProvider
The documentation is a little weak when it comes to explaining the expiration policies:
"If you require fine-grained control over query cache expiration policies, you may specify a named cache region for a particular query by calling Query.setCacheRegion()."
Two questions.
1. How can I be sure that the results from the query are being cached?
2. The cache is backed by a Tangosol cache. I have two defined. A local cache with expiration cache eviction details specified and a distributed cache. Which cache will Hibernate make use of? The local cache or the distributed cache? The reason I ask is that I have data that is refreshed outside of Java code on a daily basis and the query cache needs invalidate. If the query cache makes use of the Tangosol local chace then all is well. If not any suggestions on how to invalidate the query cache?
-thanks
-matt
|
|