Env: Spring 2.5.6, Hibernate 3.3.2, Ehcache 2.0.1, terracotta 3.2.1
I have a cache on an abstract class (with 5 inheritors)
<cache name="com.f4.owl.domain.good.GoodType"
maxElementsInMemory="15000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false">
<terracotta/>
</cache>
I also have a page which loads 6550 elements. at first the cache seems to be working (items are retrieved from the cache and the page loads a lot faster) but after a while (going from a couple of minutes to some hours), it reloads everything from the database.
using terracotta developer console, it really seems like the cache is emptying from 6550 to about 70 elements.
from what I understand, setting both timeToIdleSeconds and timeToLiveSeconds to zero should make the cache eternal and so it should never shrink. Can someone shed some light on this?