我正在测试东西,目前生成并插入 1048576ish 条目到缓存中。
ehcache 设置为在溢出到磁盘之前接受 1048579 个条目,这很有效。除了甚至在它溢出到磁盘之前,还有 1048576ish DiskMarkers 并且它们使用的堆比我的实际元素少一点。
有没有办法让ehcache在写入磁盘之前不创建DiskMarker?
ehcache.xml 如下:
<ehcache>
<diskStore path="/home/deepy/cache"/>
<cache
name="first"
maxElementsInMemory="1048579"
eternal="true"
overflowToDisk="true"
memoryStoreEvictionPolicy="LFU"
diskPersistent="false" />
</ehcache>