admin
2022-03-31 36754ba47da7a3277d5be183a523c912a1dc4cef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd">
 
    <!--磁盘缓存的地址 -->
    <diskStore path="java.io.tmpdir/ehcache" /><!-- 达到内存上限后缓存文件保存位置 -->
 
    <!-- <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory" 
        properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, 
        timeToLive=32" /> -->
 
    <!-- timeToLive 0是限制在同一个服务器 1是限制在同一个子网 32是限制在同一个网站 64是限制在同一个region 128是限制在同一个大洲 
        255是不限制 -->
 
 
    <!-- 默认缓存 -->
    <defaultCache maxElementsInMemory="1000" eternal="false"
        maxElementsOnDisk="10000" timeToIdleSeconds="120" timeToLiveSeconds="120"
        overflowToDisk="false" />
 
 
 
    <!-- 配置文件缓存 -->
    <cache name="configCache" maxElementsInMemory="1000"
           maxElementsOnDisk="10000" eternal="false" timeToIdleSeconds="120"
           timeToLiveSeconds="120" overflowToDisk="true"
           memoryStoreEvictionPolicy="LRU" />
 
</ehcache>