yuxc
2025-01-15 67df4c1a5ef6ead480c539b8fccdb6b37d51401d
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
<?xml version="1.0" encoding="UTF-8"?>
<ehcache name="es">
    <diskStore path="java.io.tmpdir"/>
    <defaultCache
            maxElementsInMemory="10000"
            eternal="false"
            timeToIdleSeconds="30"
            timeToLiveSeconds="30"
            overflowToDisk="true">
    </defaultCache>
    <!-- 配置自定义缓存
    maxElementsInMemory:缓存中允许创建的最大对象数
    eternal:缓存中对象是否为永久的,如果是,超时设置将被忽略,对象从不过期。
    timeToIdleSeconds:缓存数据的钝化时间,也就是在一个元素消亡之前, 两次访问时间的最大时间间隔值,这只能在元素不是永久驻留时有效,
    如果该值是 0 就意味着元素可以停顿无穷长的时间。
    timeToLiveSeconds:缓存数据的生存时间,也就是一个元素从构建到消亡的最大时间间隔值,
    这只能在元素不是永久驻留时有效,如果该值是0就意味着元素可以停顿无穷长的时间。
    overflowToDisk:内存不足时,是否启用磁盘缓存。
    memoryStoreEvictionPolicy:缓存满了之后的淘汰算法。 -->
    <cache name="vci_session_cache"
           maxElementsInMemory="1000"
           eternal="false"
           overflowToDisk="true"
           timeToIdleSeconds="900"
           timeToLiveSeconds="1800"
           diskPersistent="false"
           memoryStoreEvictionPolicy="LFU" />
    <cache name="vci_object_service"
           maxElementsInMemory="100000"
           eternal="false"
           overflowToDisk="true"
           timeToIdleSeconds="900"
           timeToLiveSeconds="1800"
           diskPersistent="false"
           memoryStoreEvictionPolicy="LFU" />
    <cache name="VCI_USER"
           maxElementsInMemory="1000"
           eternal="false"
           overflowToDisk="true"
           timeToIdleSeconds="900"
           timeToLiveSeconds="1800"
           diskPersistent="false"
           memoryStoreEvictionPolicy="LFU" />
</ehcache>