Files
Jiscuss/src/main/resources/ehcache.xml
T
2020-10-14 11:29:36 +08:00

37 lines
1.2 KiB
XML

<!-- ehcache配置 -->
<ehcache
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
updateCheck="false">
<!--缓存路径,用户目录下的base_ehcache目录-->
<diskStore path="user.home/base_ehcache"/>
<defaultCache
maxElementsInMemory="20000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
maxElementsOnDisk="10000000"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"/>
<!--
缓存文件名:user,同样的可以配置多个缓存
maxElementsInMemory:内存中最多存储
eternal:外部存储
overflowToDisk:超出缓存到磁盘
diskPersistent:磁盘持久化
timeToLiveSeconds:缓存时间
diskExpiryThreadIntervalSeconds:磁盘过期时间
-->
<cache name="user"
maxElementsInMemory="20000"
eternal="true"
overflowToDisk="true"
diskPersistent="false"
timeToLiveSeconds="0"
diskExpiryThreadIntervalSeconds="120"/>
</ehcache>