| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?xml version="1.0" encoding="UTF-8"?>
- <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="false"
- monitoring="autodetect" dynamicConfig="true">
- <diskStore path="java.io.tmpdir" />
- <defaultCache maxEntriesLocalHeap="10000" eternal="false"
- timeToIdleSeconds="120" timeToLiveSeconds="120" diskSpoolBufferSizeMB="30"
- maxEntriesLocalDisk="10000000" diskExpiryThreadIntervalSeconds="120"
- memoryStoreEvictionPolicy="LRU">
- <persistence strategy="localTempSwap" />
- </defaultCache>
- <!-- 配置自定义缓存 maxElementsInMemory:缓存中允许创建的最大对象数 eternal:缓存中对象是否为永久的,如果是,超时设置将被忽略,对象从不过期。
- timeToIdleSeconds:缓存数据的钝化时间,也就是在一个元素消亡之前, 两次访问时间的最大时间间隔值,这只能在元素不是永久驻留时有效,
- 如果该值是 0 就意味着元素可以停顿无穷长的时间。 timeToLiveSeconds:缓存数据的生存时间,也就是一个元素从构建到消亡的最大时间间隔值,
- 这只能在元素不是永久驻留时有效,如果该值是0就意味着元素可以停顿无穷长的时间。 overflowToDisk:内存不足时,是否启用磁盘缓存。 memoryStoreEvictionPolicy:缓存满了之后的淘汰算法。 -->
- <cache name="SimplePageCachingFilter" maxElementsInMemory="10000"
- eternal="false" overflowToDisk="false" timeToIdleSeconds="900"
- timeToLiveSeconds="1800" memoryStoreEvictionPolicy="LFU" />
- <cache name="user" maxElementsInMemory="100000" eternal="true"
- overflowToDisk="false" memoryStoreEvictionPolicy="FIFO" />
- <cache name="privilege" maxElementsInMemory="100000" eternal="true"
- overflowToDisk="false" memoryStoreEvictionPolicy="FIFO" />
- <!-- <cache name="cfg" -->
- <!-- maxElementsInMemory="10000" -->
- <!-- eternal="true" -->
- <!-- overflowToDisk="false" -->
- <!-- memoryStoreEvictionPolicy="FIFO" /> -->
- <!-- <cache name="security_code" -->
- <!-- maxElementsInMemory="10000" -->
- <!-- eternal="true" -->
- <!-- overflowToDisk="false" -->
- <!-- memoryStoreEvictionPolicy="FIFO" /> -->
- <!-- <cache name="security_code_num" -->
- <!-- maxElementsInMemory="10000" -->
- <!-- eternal="true" -->
- <!-- overflowToDisk="false" -->
- <!-- memoryStoreEvictionPolicy="FIFO" /> -->
- </ehcache>
|