ehcache.xml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ehcache updateCheck="false">
  3. <diskStore path="java.io.tmpdir" />
  4. <!-- Cluster localhost setting -->
  5. <!-- add-end-Author:xuguojie Date:20160228 for: 解决 ehcache空指针异常 -->
  6. <cacheManagerPeerProviderFactory
  7. class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
  8. properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
  9. multicastGroupPort=4446, timeToLive=32"/>
  10. <!-- add-end-Author:xuguojie Date:20160228 for:解决 ehcache空指针异常 -->
  11. <cacheManagerPeerListenerFactory
  12. class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
  13. properties="hostName=localhost, port=40001,socketTimeoutMillis=2000" />
  14. <cache name="dictCache" maxElementsInMemory="500" overflowToDisk="true"
  15. eternal="true">
  16. <cacheEventListenerFactory
  17. class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
  18. properties="replicatePuts=false,replicateUpdatesViaCopy=false" />
  19. </cache>
  20. <cache name="eternalCache" maxElementsInMemory="500"
  21. overflowToDisk="true" eternal="false" timeToIdleSeconds="1200"
  22. timeToLiveSeconds="1200">
  23. <cacheEventListenerFactory
  24. class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
  25. properties="replicatePuts=false,replicateUpdatesViaCopy=false" />
  26. </cache>
  27. <!-- DefaultCache setting. Modify ehcache-safe.xml for timeToIdleSeconds,timeToLiveSecond,diskExpiryThreadIntervalSeconds
  28. Use ehcache-safe.xml default for maxElementsInMemory,maxElementsOnDisk,overflowToDisk,eternal
  29. Use ehcache default for memoryStoreEvictionPolicy,diskPersistent,. -->
  30. <defaultCache maxElementsInMemory="10000" overflowToDisk="true"
  31. eternal="false" memoryStoreEvictionPolicy="LRU" maxElementsOnDisk="10000000"
  32. diskExpiryThreadIntervalSeconds="600" timeToIdleSeconds="3600"
  33. timeToLiveSeconds="100000" diskPersistent="false" />
  34. </ehcache>