【问题标题】:EhCache Cache WarmingEhCache 缓存预热
【发布时间】:2012-02-24 01:20:26
【问题描述】:

我设置了DiskStoreBootstrapCacheLoaderFactory。如何检查它是否真的有效?

  <cache name="systemService.getLatestPublishInfo"
maxElementsInMemory="5" eternal="true" timeToIdleSeconds="0"
timeToLiveSeconds="0" overflowToDisk="true" maxElementsOnDisk="100"
diskPersistent="true" diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU">
<bootstrapCacheLoaderFactory
  class="net.sf.ehcache.store.DiskStoreBootstrapCacheLoaderFactory"
  properties="bootstrapAsynchronously=false" />
</cache>

重启后我没有观察到与日志有任何不同。

【问题讨论】:

    标签: ehcache


    【解决方案1】:

    net.sf.ehcache.Statistics 会给出 DiskHits 和 MemoryHits 的计数。理想情况下,如果所有内容都加载到内存中,它应该为零

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-07
      相关资源
      最近更新 更多