Debian Codegraph @

src/test/resources/ehcache-nodefault.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 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 <!--Default Cache configuration. These will applied to caches programmatically created through
16 the CacheManager.
17
18 The following attributes are required:
19
20 maxElementsInMemory - Sets the maximum number of objects that will be created in memory
21 eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
22 element is never expired.
23 overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
24 has reached the maxInMemory limit.
25
26 The following attributes are optional:
27 timeToIdleSeconds - Sets the time to idle for an element before it expires.
28 i.e. The maximum amount of time between accesses before an element expires
29 Is only used if the element is not eternal.
30 Optional attribute. A value of 0 means that an Element can idle for infinity.
31 The default value is 0.
32 timeToLiveSeconds - Sets the time to live for an element before it expires.
33 i.e. The maximum time between creation time and when an element expires.
34 Is only used if the element is not eternal.
35 Optional attribute. A value of 0 means that and Element can live for infinity.
36 The default value is 0.
37 diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
38 The default value is false.
39 diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
40 is 120 seconds.
41
42 Note: Commented out to test configs without defaults.
43 <defaultCache
44 maxElementsInMemory="10000"
45 eternal="false"
46 timeToIdleSeconds="120"
47 timeToLiveSeconds="120"
48 overflowToDisk="true"
49 diskPersistent="false"
50 diskExpiryThreadIntervalSeconds="120"
51 /> -->
52
53 <!--Predefined caches. Add your cache configuration settings here.
54 If you do not have a configuration for your cache a WARNING will be issued when the
55 CacheManager starts
56
57 The following attributes are required:
58
59 name - Sets the name of the cache. This is used to identify the cache.
60 It must be unique.
61 maxInMemory - Sets the maximum number of objects that will be created in memory
62 eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the
63 element is never expired.
64 overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
65 has reached the maxInMemory limit.
66
67 The following attributes are optional:
68 timeToIdleSeconds - Sets the time to idle for an element before it expires.
69 i.e. The maximum amount of time between accesses before an element expires
70 Is only used if the element is not eternal.
71 Optional attribute. A value of 0 means that an Element can idle for infinity.
72 The default value is 0.
73 timeToLiveSeconds - Sets the time to live for an element before it expires.
74 i.e. The maximum time between creation time and when an element expires.
75 Is only used if the element is not eternal.
76 Optional attribute. A value of 0 means that and Element can live for infinity.
77 The default value is 0.
78 diskPersistent - Whether the disk store persists between restarts of the Virtual Machine.
79 The default value is false.
80 diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value
81 is 120 seconds.
82 -->
83
84 <!-- Sample cache named sampleCache1
85 This cache contains a maximum in memory of 10000 elements, and will expire
86 an element if it is idle for more than 5 minutes and lives for more than
87 10 minutes.
88
89 If there are more than 10000 elements it will overflow to the
90 disk cache, which in this configuration will go to wherever java.io.tmp is
91 defined on your system. On a standard Linux system this will be /tmp"
92 -->
93 <cache name="sampleCache1"
94 maxElementsInMemory="10000"
95 eternal="false"
96 timeToIdleSeconds="300"
97 timeToLiveSeconds="600"
98 overflowToDisk="true"
99 />
100
101 <!-- Sample cache named sampleCache2
102 This cache has a maximum of 1000 elements in memory. There is no overflow to disk, so 1000
103 is also the maximum cache size. Note that when a cache is eternal, timeToLive and timeToIdle
104 are not used and do not need to be specified -->
105 <cache name="sampleCacheNoOptionalAttributes"
106 maxElementsInMemory="1000"
107 eternal="true"
108 overflowToDisk="false"
109 />
110
111 <!-- Sample cache named sampleCache3. This cache overflows to disk. The disk store is persistent
112 between cache and VM restarts. The disk expiry thread interval is set to 10 minutes, overriding
113 the default of 2 minutes. -->
114
115 <cache name="sampleCache3"
116 maxElementsInMemory="500"
117 eternal="false"
118 timeToIdleSeconds="300"
119 timeToLiveSeconds="600"
120 overflowToDisk="true"
121 diskPersistent="true"
122 diskExpiryThreadIntervalSeconds="1"
123 />
124
125 <cache name="sampleCache4"
126 maxElementsInMemory="500"
127 eternal="false"
128 timeToIdleSeconds="300"
129 timeToLiveSeconds="600"
130 overflowToDisk="true"
131 diskPersistent="true"
132 diskExpiryThreadIntervalSeconds="1"
133 transactionalMode="xa_strict"
134 />
135
136
137 <!-- Place configuration for your caches following -->
138
139 </ehcache>