<?xml version="1.0" encoding="UTF-8"?>
<infinispan
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:infinispan:config:15.0 https://infinispan.org/schemas/infinispan-config-15.0.xsd"
        xmlns="urn:infinispan:config:15.0">

    <cache-container name="replicated" statistics="true">
        <transport cluster="${infinispan.cluster.name:cluster}" stack="${infinispan.cluster.stack:tcp}" node-name="${infinispan.node.name:}"/>
        <global-state>
            <persistent-location path="./cache-data"/>
        </global-state>

        <replicated-cache-configuration name="replicated" mode="ASYNC" statistics="true">
            <encoding media-type="application/x-protostream"/>
            <persistence>
                <file-store shared="false">
                    <write-behind modification-queue-size="2048"/>
                    <index path="./index"/>
                    <data path="./data"/>
                </file-store>
            </persistence>
            <memory max-count="1000000" when-full="REMOVE"/>
        </replicated-cache-configuration>

        <!-- Project-related caches -->
        <replicated-cache name="ProjectFolder" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.ProjectFolder</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>
        <replicated-cache name="ProjectFile" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.ProjectFile</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>

        <replicated-cache name="ProjectFileCommited" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.ProjectFileCommited</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>

        <!-- Deployment-related caches -->
        <replicated-cache name="DeploymentStatus" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.DeploymentStatus</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>
        <replicated-cache name="PodContainerStatus" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.PodContainerStatus</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>
        <replicated-cache name="ServiceStatus" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.ServiceStatus</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>
        <replicated-cache name="CamelStatus" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.CamelStatus</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>

        <!-- Access/security caches -->
        <replicated-cache name="AccessUser" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.AccessUser</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>
        <replicated-cache name="AccessRole" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.AccessRole</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>
        <replicated-cache name="AccessPassword" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.AccessPassword</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>
        <replicated-cache name="AccessSession" configuration="replicated">
            <indexing enabled="true" path="./indexing">
                <index-reader refresh-interval="1000"/>
                <indexed-entities>
                    <indexed-entity>org.apache.camel.karavan.cache.AccessSession</indexed-entity>
                </indexed-entities>
            </indexing>
        </replicated-cache>
    </cache-container>
</infinispan>
