I'm using ehcache as a hot cache on my server. I want it to be completely in memory and only write to disk for persistence. To load back from when the application restarts.
I'm seeing that ehcache is writing to disk on almost every cache put. Here is what the documentation says
Operation of a Cache where overflowToDisk is false and diskPersistent is true
In this configuration case, the disk will be written on flush or shutdown.
The next time the cache is started, the disk store will initialise but will not permit overflow from the
MemoryStore. In all other respects it acts like a normal disk store.
However when I check /mnt/ehcache I see that it's being written to on every put. Any reason why it's happening?
Here's my cache config.
<diskStore path="/mnt/ehcache/" />
<cache
name="feedLocalCache"
maxEntriesLocalHeap="2000000"
eternal="false"
timeToLiveSeconds="1800"
timeToIdleSeconds="0"
diskPersistent="true"
overflowToDisk="false"
memoryStoreEvictionPolicy="LFU" >
<bootstrapCacheLoaderFactory class="net.sf.ehcache.store.DiskStoreBootstrapCacheLoaderFactory" properties="bootstrapAsynchronously=true"/>