<?xml version="1.0" encoding="UTF-8"?>

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

    <!-- Disable for test ehcache.xml. Should go to the same place. -->
    <diskStore path="java.io.tmpdir"/>

    <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
                                     properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1, multicastGroupPort=4446, timeToLive=0"/>


    <cacheManagerPeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
                                     properties="hostName=, port=, socketTimeoutMillis="/>


    <defaultCache
            maxElementsInMemory="10"
            eternal="false"
            timeToIdleSeconds="5"
            timeToLiveSeconds="10"
            overflowToDisk="true"
            />


    <!-- Sample cache named sampleCache1 -->
    <cache name="sampleCache1"
           maxElementsInMemory="10000"
           maxElementsOnDisk="1000"
           eternal="false"
           timeToIdleSeconds="360"
           timeToLiveSeconds="1000"
           overflowToDisk="true"
           memoryStoreEvictionPolicy="LRU">
        <cacheEventListenerFactory class="net.sf.ehcache.event.NullCacheEventListenerFactory"/>
    </cache>

    <!-- Sample cache named sampleCache2. Is eternal. Is diskPersistent but does not overflow to disk -->
    <cache name="sampleCache2"
           maxElementsInMemory="1000"
           eternal="true"
           overflowToDisk="false"
           diskPersistent="true"
            />

    <!-- Sample cache with a loader timeout -->
    <cache name="sampleCacheTimeout"
           maxElementsInMemory="10000"
           maxElementsOnDisk="1000"
           eternal="false"
           timeToIdleSeconds="360"
           timeToLiveSeconds="1000"
           overflowToDisk="true"
           cacheLoaderTimeoutMillis="1000"
           memoryStoreEvictionPolicy="LRU">
        <cacheEventListenerFactory class="net.sf.ehcache.event.NullCacheEventListenerFactory"/>
    </cache>

    <!-- Sample cache named sampleCacheNoIdle, which does not specify the optional idle time -->
    <cache name="sampleCacheNoIdle"
           maxElementsInMemory="1000"
           eternal="false"
           timeToLiveSeconds="5"
           overflowToDisk="false"
            />

    <!-- Sample cache named sampleCacheNotEternalButNoIdleOrExpiry -->
    <cache name="sampleCacheNotEternalButNoIdleOrExpiry"
           maxElementsInMemory="1000"
           eternal="false"
           overflowToDisk="false"
            />

    <!-- A cache with short idle and live expiries, suitable for tests -->
    <cache name="sampleIdlingExpiringCache"
           maxElementsInMemory="1"
           eternal="false"
           timeToIdleSeconds="2"
           timeToLiveSeconds="5"
           overflowToDisk="true"
           diskPersistent="true"
            />

    <!-- A cache which 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="persistentLongExpiryIntervalCache"
           maxElementsInMemory="500"
           eternal="false"
           timeToIdleSeconds="300"
           timeToLiveSeconds="600"
           overflowToDisk="true"
           diskPersistent="true"
           diskExpiryThreadIntervalSeconds="600"
           memoryStoreEvictionPolicy="LRU"
            />

    <!-- Page Caches  for Web filter tests -->
    <cache name="CachedLogin"
           maxElementsInMemory="10"
           eternal="false"
           timeToIdleSeconds="10000"
           timeToLiveSeconds="10000"
           overflowToDisk="true">
    </cache>


    <cache name="FooterPageCache"
           maxElementsInMemory="10"
           eternal="false"
           timeToIdleSeconds="10000"
           timeToLiveSeconds="10000"
           overflowToDisk="true">
    </cache>


    <!-- Test Page Caches -->
    <cache name="SimplePageCachingFilter"
           maxElementsInMemory="10"
           eternal="false"
           timeToIdleSeconds="10000"
           timeToLiveSeconds="10000"
           overflowToDisk="true"
           diskPersistent="true"
           clearOnFlush="false" >
    </cache>

    <cache name="SimplePageFragmentCachingFilter"
           maxElementsInMemory="10"
           eternal="false"
           timeToIdleSeconds="10000"
           timeToLiveSeconds="10000"
           diskPersistent="true"
           overflowToDisk="true">
    </cache>


    <cache name="Simple/PageCachingFilterWithBlankPage#Problem"
           maxElementsInMemory="10"
           eternal="false"
           timeToIdleSeconds="10000"
           timeToLiveSeconds="10000"
           overflowToDisk="true">
    </cache>

    <!-- Asynchronous Caching tests -->
    <cache name="net.sf.ehcache.constructs.asynchronous.MessageCache"
           maxElementsInMemory="1"
           eternal="false"
           timeToIdleSeconds="10000"
           timeToLiveSeconds="10000"
           overflowToDisk="true">
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
                                   properties="replicateAsynchronously=true,
                                               replicatePuts=true,
                                               replicateUpdates=true,
                                               replicateUpdatesViaCopy=true,
                                               replicateRemovals=true "/>
    </cache>

    <cache name="exceptionHandlingCache"
           maxElementsInMemory="10000"
           maxElementsOnDisk="1000"
           eternal="false"
           timeToIdleSeconds="360"
           timeToLiveSeconds="1000"
           overflowToDisk="true"
           memoryStoreEvictionPolicy="LRU">
        <cacheEventListenerFactory class="net.sf.ehcache.event.NullCacheEventListenerFactory"/>
        <cacheLoaderFactory class="net.sf.ehcache.loader.CountingCacheLoaderFactory"
                            properties="type=int,startCounter=10"/>
        <cacheExceptionHandlerFactory class="net.sf.ehcache.exceptionhandler.CountingExceptionHandlerFactory"
                                      properties="logLevel=FINE"/>
    </cache>

    <cache name="disabledStats"
           maxElementsInMemory="10"
           eternal="false"
           timeToIdleSeconds="5"
           timeToLiveSeconds="10"
           overflowToDisk="true"
           statistics="false">
    </cache>

</ehcache>
