<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../main/config/ehcache.xsd">

    <diskStore path="java.io.tmpdir"/>

    <defaultCache
            maxElementsInMemory="10000"
            eternal="false"
            timeToIdleSeconds="120"
            timeToLiveSeconds="120"
            overflowToDisk="true"
            diskPersistent="false"
            diskExpiryThreadIntervalSeconds="120"
            memoryStoreEvictionPolicy="LFU"
            />

    <!-- Sample cache named sampleCache1
        This cache contains a maximum in memory of 10000 elements, and will expire
        an element if it is idle for more than 5 minutes and lives for more than
        10 minutes.

        If there are more than 10000 elements it will overflow to the
        disk cache, which in this configuration will go to wherever java.io.tmp is
        defined on your system. On a standard Linux system this will be /tmp"
        -->
    <cache name="sampleLFUCache1"
           maxElementsInMemory="4"
           eternal="false"
           overflowToDisk="true"
           timeToIdleSeconds="300"
           timeToLiveSeconds="600"
           memoryStoreEvictionPolicy="LFU"
           maxElementsOnDisk="10000"
           diskPersistent="true"
            />

    <!-- Sample cache named sampleCache2
        This cache has a maximum of 1000 elements in memory. There is no overflow to disk, so 1000
        is also the maximum cache size. Note that when a cache is eternal, timeToLive and timeToIdle
        are not used and do not need to be specified -->
    <cache name="sampleFIFOCache2"
           maxElementsInMemory="5"
           eternal="false"
           overflowToDisk="false"
           timeToIdleSeconds="300"
           timeToLiveSeconds="600"
           memoryStoreEvictionPolicy="FIFO"
            />

    <!-- Sample cache named sampleCache3. This cache overflows to disk. The disk store is persistent
         between cache and VM restarts. The disk expiry thread interval is set to 10 minutes, overriding
         the default of 2 minutes. -->

    <cache name="sampleCache3"
           maxElementsInMemory="500"
           eternal="false"
           overflowToDisk="true"
           timeToIdleSeconds="300"
           timeToLiveSeconds="600"
           diskPersistent="true"
           diskExpiryThreadIntervalSeconds="1"
           memoryStoreEvictionPolicy="LFU"
            />

    <cache name="sampleLFUCache2"
           maxElementsInMemory="0"
           eternal="false"
           overflowToDisk="true"
           timeToIdleSeconds="300"
           timeToLiveSeconds="600"
           memoryStoreEvictionPolicy="LFU"
            />

    <cache name="test-cache"
            maxElementsInMemory="3"
            maxElementsOnDisk="1"
            eternal="true"
            overflowToDisk="true"
            diskPersistent="true"
            memoryStoreEvictionPolicy="LFU"

            />

</ehcache>
