我单独用java调用ehcache缓存方法。在ehcache.xml文件中 设置
        <diskStore path="D:/jr/" />
        <cache name="test" maxElementsInMemory="100" eternal="false"
overflowToDisk="true" timeToIdleSeconds="120" timeToLiveSeconds="120"
diskPersistent="true" diskExpiryThreadIntervalSeconds="20"
memoryStoreEvictionPolicy="LFU">
</cache> 
当内存中element 超出100个的时候我让其缓存到磁盘文件中。
我写了一个测试程序缓存1000个对象。按照常理应该有900个对象保存到D:/jr/目录下。我查看这个目录下并没有缓存文件。
调用cache.getDiskStoreSize();这个方法为0.我调用return cache.getSize();这个方法只返回100。那么那900个对象就丢失了。大家谁遇到过这样的情况帮分析一下原因