2 ~ Hibernate, Relational Persistence for Idiomatic Java
4 ~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
5 ~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
9 <!-- Sets the path to the directory where cache .data files are created.
11 If the path is a Java System Property it is replaced by
12 its value in the running VM.
14 The following properties are translated:
15 user.home - User's home directory
16 user.dir - User's current working directory
17 java.io.tmpdir - Default temp file path -->
18 <diskStore path="./target/tmp"/>
21 <!--Default Cache configuration. These will applied to caches programmatically created through
24 The following attributes are required for defaultCache:
26 maxInMemory - Sets the maximum number of objects that will be created in memory
27 eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
29 timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
30 if the element is not eternal. Idle time is now - last accessed time
31 timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
32 if the element is not eternal. TTL is now - creation time
33 overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
34 has reached the maxInMemory limit.
38 maxElementsInMemory="10000"
40 timeToIdleSeconds="120"
41 timeToLiveSeconds="120"
45 <!--Predefined caches. Add your cache configuration settings here.
46 If you do not have a configuration for your cache a WARNING will be issued when the
49 The following attributes are required for defaultCache:
51 name - Sets the name of the cache. This is used to identify the cache. It must be unique.
52 maxInMemory - Sets the maximum number of objects that will be created in memory
53 eternal - Sets whether elements are eternal. If eternal, timeouts are ignored and the element
55 timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
56 if the element is not eternal. Idle time is now - last accessed time
57 timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
58 if the element is not eternal. TTL is now - creation time
59 overflowToDisk - Sets whether elements can overflow to disk when the in-memory cache
60 has reached the maxInMemory limit.
64 <!-- Sample cache named sampleCache1
65 This cache contains a maximum in memory of 10000 elements, and will expire
66 an element if it is idle for more than 5 minutes and lives for more than
69 If there are more than 10000 elements it will overflow to the
70 disk cache, which in this configuration will go to wherever java.io.tmp is
71 defined on your system. On a standard Linux system this will be /tmp"
73 <cache name="sampleCache1"
74 maxElementsInMemory="10000"
76 timeToIdleSeconds="300"
77 timeToLiveSeconds="600"
81 <!-- Sample cache named sampleCache2
82 This cache contains 1000 elements. Elements will always be held in memory.
83 They are not expired. -->
84 <cache name="sampleCache2"
85 maxElementsInMemory="1000"
89 overflowToDisk="false"
92 <!-- Place configuration for your caches following -->