Added tutorials of the hibernate-release 5.2.18.Final
[hibernate4-maven-plugin] / src / it / tutorials-5.2.18 / osgi / unmanaged-native / src / main / resources / ehcache.xml
1 <!--
2   ~ Hibernate, Relational Persistence for Idiomatic Java
3   ~
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>.
6   -->
7 <ehcache>
8
9     <!-- Sets the path to the directory where cache .data files are created.
10
11          If the path is a Java System Property it is replaced by
12          its value in the running VM.
13
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"/>
19
20
21     <!--Default Cache configuration. These will applied to caches programmatically created through
22         the CacheManager.
23
24         The following attributes are required for defaultCache:
25
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
28                             is never expired.
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.
35
36         -->
37     <defaultCache
38         maxElementsInMemory="10000"
39         eternal="false"
40         timeToIdleSeconds="120"
41         timeToLiveSeconds="120"
42         overflowToDisk="true"
43         />
44
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
47         CacheManager starts
48
49         The following attributes are required for defaultCache:
50
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
54                             is never expired.
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.
61
62         -->
63
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
67         10 minutes.
68
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"
72         -->
73     <cache name="sampleCache1"
74         maxElementsInMemory="10000"
75         eternal="false"
76         timeToIdleSeconds="300"
77         timeToLiveSeconds="600"
78         overflowToDisk="true"
79         />
80
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"
86         eternal="true"
87         timeToIdleSeconds="0"
88         timeToLiveSeconds="0"
89         overflowToDisk="false"
90         /> -->
91
92     <!-- Place configuration for your caches following -->
93
94 </ehcache>