This commit is contained in:
2019-08-15 01:25:05 +08:00
parent 3c56288991
commit 7242f6d76c
74 changed files with 4375 additions and 126 deletions
@@ -0,0 +1,29 @@
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd">
<!--
这个是磁盘存储路径,当内存缓存满了的时候,就会往这里面放
java.io.tmdir是操作系统缓存的临时目录,不同操作系统缓存目录不一样
-->
<diskStore path="java.io.tmpdir"/>
<!-- defaultCache:echcache的默认缓存策略 -->
<defaultCache
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
maxElementsOnDisk="10000000"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU">
<persistence strategy="localTempSwap"/>
</defaultCache>
<cache name="userCache"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
maxElementsOnDisk="10000000"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU">
<persistence strategy="localTempSwap"/>
</cache>
</ehcache>