posted 18 years ago
Hi,
I try to setup Hibernate Query Cache, I am using ehcache.
It works in the beginning (i.e. if i execute the same query multiple times,
it does not send the sql commands to mysql everytime).
however, after about 1 minutes, the cache seems expire (i.e. I see hibernate executes sql commmands to the database.
I have the following configuration in my ehcache.xml file. So the query cache should last 2 hours (7200 seconds), I don't understand why my query cache expires so soon.
Thank you for any help.
<defaultCache maxElementsInMemory="10000" eternal="false" overflowToDisk="true" timeToIdleSeconds="7200" timeToLiveSeconds="7200" diskPersistent="false" diskExpiryThreadIntervalSeconds="7200"/>