Debian Codegraph @

src/test/resources/ehcache-nolisteners.xml

raw
1 <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../main/config/ehcache.xsd">
2
3 <!-- Sets the path to the directory where cache .data files are created.
4
5 If the path is a Java System Property it is replaced by
6 its value in the running VM. Subdirectories can be specified below the property e.g. java.io.tmpdir/one
7
8 The following properties are translated:
9 user.home - User's home directory
10 user.dir - User's current working directory
11 java.io.tmpdir - Default temp file path -->
12 <diskStore path="java.io.tmpdir"/>
13
14
15
16 <!--Default Cache configuration. These will applied to caches programmatically created through
17 the CacheManager.
18
19 The following attributes are required:
20
21 maxElementsInMemory - Sets the maximum number of objects that will be created in memory
22 eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
23 element is never expired.
24 overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
25 has reached the maxInMemory limit.
26
27 The following attributes are optional:
28 timeToIdleSeconds - Sets the time to idle for an element before it expires.
29 i.e. The maximum amount of time between accesses before an element expires
30 Is only used if the element is not eternal.
31 Optional attribute. A value of 0 means that an Element can idle for infinity.
32 The default value is 0.
33 timeToLiveSeconds - Sets the time to live for an element before it expires.
34 i.e. The maximum time between creation time and when an element expires.
35 Is only used if the element is not eternal.
36 Optional attribute. A value of 0 means that and Element can live for infinity.
37 The default value is 0.
38 diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
39 The default value is false.
40 diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
41 is 120 seconds.
42 -->
43
44 <defaultCache
45 maxElementsInMemory="10"
46 eternal="false"
47 timeToIdleSeconds="5"
48 timeToLiveSeconds="10"
49 overflowToDisk="true"
50 />
51
52 <!--Predefined caches. Add your cache configuration settings here.
53 If you do not have a configuration for your cache a WARNING will be issued when the
54 CacheManager starts
55
56 The following attributes are required for defaultCache:
57
58 name - Sets the name of the cache. This is used to identify the cache.
59 It must be unique.
60 maxElementsInMemory - Sets the maximum number of objects that will be created in memory
61 eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
62 element is never expired.
63 overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
64 has reached the maxInMemory limit.
65
66 The following attributes are optional:
67 timeToIdleSeconds - Sets the time to idle for an element before it expires.
68 i.e. The maximum amount of time between accesses before an element expires
69 Is only used if the element is not eternal.
70 Optional attribute. A value of 0 means that an Element can idle for infinity.
71 The default value is 0.
72 timeToLiveSeconds - Sets the time to live for an element before it expires.
73 i.e. The maximum time between creation time and when an element expires.
74 Is only used if the element is not eternal.
75 Optional attribute. A value of 0 means that and Element can live for infinity.
76 The default value is 0.
77 diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
78 The default value is false.
79 diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
80 is 120 seconds.
81 -->
82
83 <!-- Sample cache named sampleCache1 -->
84 <cache name="sampleCache1"
85 maxElementsInMemory="10"
86 maxElementsOnDisk="20"
87 eternal="false"
88 timeToIdleSeconds="5"
89 timeToLiveSeconds="5"
90 overflowToDisk="true"
91 memoryStoreEvictionPolicy="LRU"
92 diskExpiryThreadIntervalSeconds="1"
93 />
94
95 <!-- Sample cache named sampleCache2. -->
96 <cache name="sampleCache2"
97 maxElementsInMemory="10"
98 eternal="false"
99 timeToLiveSeconds="1"
100 overflowToDisk="false">
101 <cacheEventListenerFactory class="net.sf.ehcache.event.CountingCacheEventListenerFactory"/>
102 </cache>
103
104
105 <!-- Sample cache named sampleCache3. Is eternal -->
106 <cache name="sampleCache3"
107 maxElementsInMemory="10"
108 eternal="false"
109 timeToLiveSeconds="1"
110 overflowToDisk="false"
111 memoryStoreEvictionPolicy="FIFO">
112 <cacheEventListenerFactory class="net.sf.ehcache.event.CountingCacheEventListenerFactory"/>
113 </cache>
114
115
116 <!-- Sample cache named sampleCache4. Is eternal -->
117 <cache name="sampleCache4"
118 maxElementsInMemory="10"
119 eternal="false"
120 timeToLiveSeconds="1"
121 overflowToDisk="false"
122 memoryStoreEvictionPolicy="LFU">
123 <cacheEventListenerFactory class="net.sf.ehcache.event.CountingCacheEventListenerFactory"/>
124 </cache>
125
126
127 <!-- Sample cache named sampleCacheNoIdle, which does not specify the optional idle time -->
128 <cache name="sampleCacheNoIdle"
129 maxElementsInMemory="1000"
130 eternal="false"
131 timeToLiveSeconds="5"
132 overflowToDisk="false"
133 />
134
135 <!-- Sample cache named sampleCacheNotEternalButNoIdleOrExpiry -->
136 <cache name="sampleCacheNotEternalButNoIdleOrExpiry"
137 maxElementsInMemory="1000"
138 eternal="false"
139 overflowToDisk="false"
140 />
141
142 <!-- A cache with short idle and live expiries, suitable for tests -->
143 <cache name="sampleIdlingExpiringCache"
144 maxElementsInMemory="1"
145 eternal="false"
146 timeToIdleSeconds="2"
147 timeToLiveSeconds="5"
148 overflowToDisk="true"
149 />
150
151 <!-- A cache which overflows to disk. The disk store is persistent
152 between cache and VM restarts. The disk expiry thread interval is set to 10 minutes, overriding
153 the default of 2 minutes. -->
154 <cache name="persistentLongExpiryIntervalCache"
155 maxElementsInMemory="500"
156 eternal="false"
157 timeToIdleSeconds="300"
158 timeToLiveSeconds="600"
159 overflowToDisk="true"
160 diskPersistent="true"
161 diskExpiryThreadIntervalSeconds="600"
162 />
163
164 <!-- Page Caches -->
165
166 <cache name="CachedLogin"
167 maxElementsInMemory="10"
168 eternal="false"
169 timeToIdleSeconds="10000"
170 timeToLiveSeconds="10000"
171 overflowToDisk="true"
172 />
173
174 <cache name="FooterPageCache"
175 maxElementsInMemory="10"
176 eternal="false"
177 timeToIdleSeconds="10000"
178 timeToLiveSeconds="10000"
179 overflowToDisk="true"
180 />
181
182 </ehcache>