<?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"/>

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

    <cache name="writeThroughCache1" eternal="false" maxElementsInMemory="1000" overflowToDisk="false"/>

    <cache name="writeThroughCache2" eternal="false" maxElementsInMemory="1000" overflowToDisk="false">
        <cacheWriter/>
    </cache>

    <cache name="writeThroughCache3" eternal="false" maxElementsInMemory="1000" overflowToDisk="false">
        <cacheWriter writeMode="write-through" notifyListenersOnException="true" maxWriteDelay="30"
                     rateLimitPerSecond="10" writeCoalescing="true" writeBatching="true" writeBatchSize="8"
                     retryAttempts="20" retryAttemptDelaySeconds="60"/>
    </cache>

    <cache name="writeThroughCache4" eternal="false" maxElementsInMemory="1000" overflowToDisk="false">
        <cacheWriter writeMode="write-through" notifyListenersOnException="false" maxWriteDelay="0"
                     rateLimitPerSecond="0" writeCoalescing="false" writeBatching="false" writeBatchSize="1"
                     retryAttempts="0" retryAttemptDelaySeconds="0">
            <cacheWriterFactory class="net.sf.ehcache.writer.TestCacheWriterFactory"/>
        </cacheWriter>
    </cache>

    <cache name="writeBehindCache5" eternal="false" maxElementsInMemory="1000" overflowToDisk="false">
        <cacheWriter writeMode="write-behind" notifyListenersOnException="true" maxWriteDelay="8" rateLimitPerSecond="5"
                     writeCoalescing="true" writeBatching="false" writeBatchSize="1"
                     retryAttempts="2" retryAttemptDelaySeconds="2">
            <cacheWriterFactory class="net.sf.ehcache.writer.TestCacheWriterFactory"
                                properties="just.some.property=test; another.property=test2" propertySeparator=";"/>
        </cacheWriter>
    </cache>

    <cache name="writeThroughCacheXml" eternal="false" maxElementsInMemory="1000" overflowToDisk="false">
        <cacheWriter>
            <cacheWriterFactory class="net.sf.ehcache.writer.TestCacheWriterFactory"/>
        </cacheWriter>
    </cache>


    <cache name="writeThroughCacheXmlProperties" eternal="false" maxElementsInMemory="1000" overflowToDisk="false">
        <cacheWriter>
            <cacheWriterFactory class="net.sf.ehcache.writer.TestCacheWriterFactory" properties="key.prefix=pre, key.suffix=suff"/>
        </cacheWriter>
    </cache>

    <cache name="writeThroughCacheJavaRegistration" eternal="false" maxElementsInMemory="1000" overflowToDisk="false"/>
</ehcache>
