<?xml version="1.0" encoding="UTF-8"?>
<ehcache name="es" updateCheck="false" >

	<diskStore path="java.io.tmpdir"/>
	
	<defaultCache maxElementsInMemory="10000"
		maxElementsOnDisk="0" eternal="false" overflowToDisk="false"
		diskPersistent="false" timeToIdleSeconds="3600" timeToLiveSeconds="0"
		diskSpoolBufferSizeMB="50" diskExpiryThreadIntervalSeconds="120"
		memoryStoreEvictionPolicy="LFU" />
	
    <!-- 登录记录缓存 锁定10分钟 -->
    <cache name="passwordRetryCache"
           maxEntriesLocalHeap="2000"
           eternal="false"
           timeToIdleSeconds="3600"
           timeToLiveSeconds="0"
           overflowToDisk="false"
           statistics="true">
    </cache>

    <cache name="authorizationCache"
           maxEntriesLocalHeap="2000"
           eternal="false"
           timeToIdleSeconds="3600"
           timeToLiveSeconds="0"
           overflowToDisk="false"
           statistics="true">
    </cache>

    <cache name="authenticationCache"
           maxEntriesLocalHeap="2000"
           eternal="false"
           timeToIdleSeconds="3600"
           timeToLiveSeconds="0"
           overflowToDisk="false"
           statistics="true">
    </cache>

    <cache name="shiro-activeSessionCache"
           maxEntriesLocalHeap="2000"
           eternal="false"
           timeToIdleSeconds="3600"
           timeToLiveSeconds="0"
           overflowToDisk="false"
           statistics="true">
    </cache>

    <cache name="code-cache"
           maxEntriesLocalHeap="2000"
           eternal="false"
           timeToIdleSeconds="3600"
           timeToLiveSeconds="0"
           overflowToDisk="false"
           statistics="true">
    </cache>

    <!--
     TTI用于设置对象在cache中的最大闲置时间，就是 在一直不访问这个对象的前提下，这个对象可以在cache中的存活时间。
     TTL用于设置对象在cache中的最大存活时间，就是 无论对象访问或是不访问(闲置),这个对象在cache中的存活时间。
    当配置了 eternal ，那么TTI和TTL这两个配置将被覆盖，对象会永恒存在cache中，永远不会过期。
    -->
    <cache name="cku-cache"
           maxEntriesLocalHeap="2000"
           eternal="false"
           timeToIdleSeconds="7200"
           timeToLiveSeconds="0"
           overflowToDisk="false"
           statistics="true">
    </cache>
	<cache name="IPCache" maxEntriesLocalHeap="10000" eternal="true" overflowToDisk="true"/>
</ehcache>
