| 1 |
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../main/config/ehcache.xsd"> |
| 2 |
|
| 3 |
<diskStore path="java.io.tmpdir"/> |
| 4 |
|
| 5 |
<defaultCache |
| 6 |
maxElementsInMemory="10000" |
| 7 |
eternal="false" |
| 8 |
timeToIdleSeconds="120" |
| 9 |
timeToLiveSeconds="120" |
| 10 |
overflowToDisk="true" |
| 11 |
diskPersistent="false" |
| 12 |
diskExpiryThreadIntervalSeconds="120" |
| 13 |
memoryStoreEvictionPolicy="LFU" |
| 14 |
/> |
| 15 |
|
| 16 |
<!-- Sample cache named sampleCache1 |
| 17 |
This cache contains a maximum in memory of 10000 elements, and will expire |
| 18 |
an element if it is idle for more than 5 minutes and lives for more than |
| 19 |
10 minutes. |
| 20 |
|
| 21 |
If there are more than 10000 elements it will overflow to the |
| 22 |
disk cache, which in this configuration will go to wherever java.io.tmp is |
| 23 |
defined on your system. On a standard Linux system this will be /tmp" |
| 24 |
--> |
| 25 |
<cache name="sampleLFUCache1" |
| 26 |
maxElementsInMemory="4" |
| 27 |
eternal="false" |
| 28 |
overflowToDisk="true" |
| 29 |
timeToIdleSeconds="300" |
| 30 |
timeToLiveSeconds="600" |
| 31 |
memoryStoreEvictionPolicy="LFU" |
| 32 |
maxElementsOnDisk="10000" |
| 33 |
diskPersistent="true" |
| 34 |
/> |
| 35 |
|
| 36 |
<!-- Sample cache named sampleCache2 |
| 37 |
This cache has a maximum of 1000 elements in memory. There is no overflow to disk, so 1000 |
| 38 |
is also the maximum cache size. Note that when a cache is eternal, timeToLive and timeToIdle |
| 39 |
are not used and do not need to be specified --> |
| 40 |
<cache name="sampleFIFOCache2" |
| 41 |
maxElementsInMemory="5" |
| 42 |
eternal="false" |
| 43 |
overflowToDisk="false" |
| 44 |
timeToIdleSeconds="300" |
| 45 |
timeToLiveSeconds="600" |
| 46 |
memoryStoreEvictionPolicy="FIFO" |
| 47 |
/> |
| 48 |
|
| 49 |
<!-- Sample cache named sampleCache3. This cache overflows to disk. The disk store is persistent |
| 50 |
between cache and VM restarts. The disk expiry thread interval is set to 10 minutes, overriding |
| 51 |
the default of 2 minutes. --> |
| 52 |
|
| 53 |
<cache name="sampleCache3" |
| 54 |
maxElementsInMemory="500" |
| 55 |
eternal="false" |
| 56 |
overflowToDisk="true" |
| 57 |
timeToIdleSeconds="300" |
| 58 |
timeToLiveSeconds="600" |
| 59 |
diskPersistent="true" |
| 60 |
diskExpiryThreadIntervalSeconds="1" |
| 61 |
memoryStoreEvictionPolicy="LFU" |
| 62 |
/> |
| 63 |
|
| 64 |
<cache name="sampleLFUCache2" |
| 65 |
maxElementsInMemory="0" |
| 66 |
eternal="false" |
| 67 |
overflowToDisk="true" |
| 68 |
timeToIdleSeconds="300" |
| 69 |
timeToLiveSeconds="600" |
| 70 |
memoryStoreEvictionPolicy="LFU" |
| 71 |
/> |
| 72 |
|
| 73 |
<cache name="test-cache" |
| 74 |
maxElementsInMemory="3" |
| 75 |
maxElementsOnDisk="1" |
| 76 |
eternal="true" |
| 77 |
overflowToDisk="true" |
| 78 |
diskPersistent="true" |
| 79 |
memoryStoreEvictionPolicy="LFU" |
| 80 |
|
| 81 |
/> |
| 82 |
|
| 83 |
</ehcache> |