<config
        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns='http://www.ehcache.org/v3'
        xsi:schemaLocation="
            http://www.ehcache.org/v3
            http://www.ehcache.org/schema/ehcache-core-3.8-1.xsd">
    <cache uses-template="default" alias="messages">
        <key-type>java.lang.String</key-type>
        <value-type>java.util.concurrent.CompletableFuture</value-type>
        <expiry>
            <ttl unit="seconds">7200</ttl>
        </expiry>

        <resources>
            <heap unit="entries">2000</heap>
        </resources>
    </cache>
    <!-- TODO no nice way yet to have this configuration split up -->
    <cache uses-template="default" alias="general-use-cache">
        <expiry>
            <ttl unit="seconds">7200</ttl>
        </expiry>

        <resources>
            <heap unit="entries">2000</heap>
        </resources>
    </cache>
    <cache-template name="default">
        <expiry>
            <ttl unit="seconds">600</ttl>
        </expiry>
        <resources>
            <heap>50</heap>
        </resources>
    </cache-template>
</config>