I'm using Ehcache
to cache the results of an expensive service call within a web application.
I want the cache to persist across JVM restarts.
I configured a 2-tier ehcache with heap
and disk
. Unfortunately Ehcache only saves the cache to disk when PersistentCacheManager.close()
is called.
How can I get the persistence to work properly? Am I supposed to periodically close and reopen the cache? Should I be looking at something other than ehcache for this?