wang-hao-jie
2022-08-25 57dcc73636bb7d8dce89c808eb8cc988a7512264
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?xml version="1.0" encoding="UTF-8"?>
<ehcache name="ruoyi" updateCheck="false">
 
    <!-- 磁盘缓存位置 -->
    <diskStore path="F:/lxw/logs"/>
 
    <!-- maxEntriesLocalHeap:堆内存中最大缓存对象数,0没有限制 -->
    <!-- maxElementsInMemory: 在内存中缓存的element的最大数目。-->
    <!-- eternal:elements是否永久有效,如果为true,timeouts将被忽略,element将永不过期 -->
    <!-- timeToIdleSeconds:失效前的空闲秒数,当eternal为false时,这个属性才有效,0为不限制 -->
    <!-- timeToLiveSeconds:失效前的存活秒数,创建时间到失效时间的间隔为存活时间,当eternal为false时,这个属性才有效,0为不限制 -->
    <!-- overflowToDisk: 如果内存中数据超过内存限制,是否要缓存到磁盘上 -->
    <!-- statistics:是否收集统计信息。如果需要监控缓存使用情况,应该打开这个选项。默认为关闭(统计会影响性能)。设置statistics="true"开启统计 -->
 
    <!-- 默认缓存 -->
    <defaultCache
            maxElementsInMemory="10000"
            eternal="false"
            timeToIdleSeconds="120"
            timeToLiveSeconds="120"
            overflowToDisk="true"
            maxElementsOnDisk="10000000"
            diskPersistent="false"
            diskExpiryThreadIntervalSeconds="120"
            memoryStoreEvictionPolicy="LRU"
    />
 
    <!-- 登录记录缓存 锁定10分钟 -->
    <!--<cache name="loginRecordCache"-->
           <!--maxEntriesLocalHeap="2000"-->
           <!--eternal="false"-->
           <!--timeToIdleSeconds="600"-->
           <!--timeToLiveSeconds="0"-->
           <!--overflowToDisk="false"-->
           <!--statistics="false">-->
    <!--</cache>-->
 
    <!--&lt;!&ndash; 系统活跃用户缓存 &ndash;&gt;-->
    <!--<cache name="sys-userCache"-->
           <!--maxEntriesLocalHeap="10000"-->
           <!--overflowToDisk="false"-->
           <!--eternal="false"-->
           <!--diskPersistent="false"-->
           <!--timeToLiveSeconds="0"-->
           <!--timeToIdleSeconds="0"-->
           <!--statistics="false">-->
    <!--</cache>-->
 
    <!--&lt;!&ndash; 系统缓存 &ndash;&gt;-->
    <!--<cache name="sys-cache"-->
           <!--maxEntriesLocalHeap="1000"-->
           <!--eternal="true"-->
           <!--overflowToDisk="false"-->
           <!--statistics="false">-->
    <!--</cache>-->
 
    <!--&lt;!&ndash; 系统参数缓存 &ndash;&gt;-->
    <!--<cache name="sys-config"-->
           <!--maxEntriesLocalHeap="1000"-->
           <!--eternal="true"-->
           <!--overflowToDisk="false"-->
           <!--statistics="false">-->
    <!--</cache>-->
 
    <!--&lt;!&ndash; 系统字典缓存 &ndash;&gt;-->
    <!--<cache name="sys-dict"-->
           <!--maxEntriesLocalHeap="1000"-->
           <!--eternal="true"-->
           <!--overflowToDisk="false"-->
           <!--statistics="false">-->
    <!--</cache>-->
 
    <!--&lt;!&ndash; 系统会话缓存 &ndash;&gt;-->
    <!--<cache name="shiro-activeSessionCache"-->
           <!--maxElementsInMemory="10000"-->
           <!--overflowToDisk="false"-->
           <!--eternal="true"-->
           <!--timeToLiveSeconds="0"-->
           <!--timeToIdleSeconds="0"-->
           <!--diskPersistent="true"-->
           <!--diskExpiryThreadIntervalSeconds="600">-->
    <!--</cache>-->
 
</ehcache>