<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cache-config SYSTEM "cache-config.dtd">
<cache-config>
    <!--Generated by ehcache2coherence.xslt-->
    <caching-scheme-mapping>
        <cache-mapping>
            <cache-name>*</cache-name>
            <scheme-name>default</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.confluence.extra.jira.OldRssMacro</cache-name>
            <scheme-name>large</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.confluence.extra.jira.JiraIssuesMacro</cache-name>
            <scheme-name>large</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.confluence.core.DefaultContentPropertyManager</cache-name>
            <scheme-name>medium</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.confluence.util.i18n.I18NBeanFactory.by.locale</cache-name>
            <scheme-name>local:default</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.confluence.util.velocity.ConfluenceVelocityResourceCache</cache-name>
            <scheme-name>cache:com.atlassian.confluence.util.velocity.ConfluenceVelocityResourceCache</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.confluence.links.DefaultReferralManager.hotReferrers</cache-name>
            <scheme-name>cache:com.atlassian.confluence.links.DefaultReferralManager.hotReferrers</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>bucket.user.providers.CachingProfileProvider.handles()</cache-name>
            <scheme-name>large-transient</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>bucket.user.providers.CachingProfileProvider.getPropertySet()</cache-name>
            <scheme-name>large-transient</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>bucket.user.providers.CachingCredentialsProvider</cache-name>
            <scheme-name>large-transient</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>bucket.user.providers.CachingAccessProvider.handles()</cache-name>
            <scheme-name>large-transient</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>bucket.user.providers.CachingAccessProvider.inGroup()</cache-name>
            <scheme-name>large-transient</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>bucket.user.persistence.dao.hibernate.BucketUserDAO.findUserByUsername()</cache-name>
            <scheme-name>large</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.confluence.security.PermissionCheckDispatcher.isPermitted()</cache-name>
            <scheme-name>large</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.bandana.BandanaPersister</cache-name>
            <scheme-name>cache:com.atlassian.bandana.BandanaPersister</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.confluence.spaces.persistence.dao.SpaceDao.getSpace()</cache-name>
            <scheme-name>cache:com.atlassian.confluence.spaces.persistence.dao.SpaceDao.getSpace()</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.confluence.core.CachingInheritedContentPermissionManager.getInheritedContentPermissionSets()</cache-name>
            <scheme-name>cache:com.atlassian.confluence.core.CachingInheritedContentPermissionManager.getInheritedContentPermissionSets()</scheme-name>
        </cache-mapping>


        <cache-mapping>
            <cache-name>com.atlassian.confluence.user.DefaultUserAccessor.deactivatedUsers</cache-name>
            <scheme-name>cache:com.atlassian.confluence.user.DefaultUserAccessor.deactivatedUsers</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.confluence.core.ContentEntityObject</cache-name>
            <scheme-name>cache:com.atlassian.confluence.core.ContentEntityObject</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.confluence.core.ContentEntityObject.bodyContents</cache-name>
            <scheme-name>cache:com.atlassian.confluence.core.ContentEntityObject.bodyContents</scheme-name>
        </cache-mapping>


        <cache-mapping>
            <cache-name>com.atlassian.confluence.core.BodyContent</cache-name>
            <scheme-name>cache:com.atlassian.confluence.core.BodyContent</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.confluence.labels.Labelling</cache-name>
            <scheme-name>medium</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.confluence.security.CachingSpacePermissionManager.permissions</cache-name>
            <scheme-name>cache:com.atlassian.confluence.security.CachingSpacePermissionManager.permissions</scheme-name>
        </cache-mapping>


        <cache-mapping>
            <cache-name>com.atlassian.confluence.rpc.auth.TokenAuthenticationManager.tokens</cache-name>
            <scheme-name>cache:com.atlassian.confluence.rpc.auth.TokenAuthenticationManager.tokens</scheme-name>
        </cache-mapping>

        <!-- NOTE:
             If you are changing the names of the LDAP or Hibernate user/group repositories, you need to make the
             necessary changes to atlassian-user.xml

             See http://confluence.atlassian.com/display/DOC/Customising+atlassian-user.xml
        -->

        <!-- LDAP repository -->
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.ldapRepository.users</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.ldapRepository.users_ro</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.ldap.LDAPUserManagerReadOnly.ldapRepository.repository</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups_hasMembership</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.groups_getGroupsForUser</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.ldap.LDAPGroupManagerReadOnly.ldapRepository.repositories</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>

        <!-- END LDAP Repository -->

        <!-- Hibernate user repository -->
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.hibernate.HibernateUserManager.hibernateRepository.users</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.hibernate.HibernateUserManager.hibernateRepository.users_ro</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.hibernate.HibernateUserManager.hibernateRepository.repository</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.user.impl.hibernate.HibernateGroupManager.hibernateRepository.groups</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.hibernate.HibernateGroupManager.hibernateRepository.groups_hasMembership</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.hibernate.HibernateGroupManager.hibernateRepository.groups_getGroupsForUser</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>
        <cache-mapping>
            <cache-name>com.atlassian.user.impl.hibernate.HibernateGroupManager.hibernateRepository.repositories</cache-name>
            <scheme-name>user</scheme-name>
        </cache-mapping>

        <!-- END Hibernate user repository -->

        <cache-mapping>
            <cache-name>com.atlassian.confluence.published-cache</cache-name>
            <scheme-name>unlimited-permanent</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>com.atlassian.confluence.renderer.UserMacroLibrary</cache-name>
            <scheme-name>unlimited-permanent</scheme-name>
        </cache-mapping>
        
        <cache-mapping>
            <cache-name>com.atlassian.confluence.core.DefaultHeartbeatManager.activities</cache-name>
            <scheme-name>medium</scheme-name>
        </cache-mapping>
        
        <cache-mapping>
            <cache-name>com.atlassian.confluence.core.ContentEntityObject.contentPermissionSets</cache-name>
            <scheme-name>medium</scheme-name>
        </cache-mapping>

        <cache-mapping>
            <cache-name>confluence.fifo.buffer.*</cache-name><!-- task queues -->
            <scheme-name>unlimited-permanent</scheme-name>
        </cache-mapping>
        
    </caching-scheme-mapping>
    <caching-schemes>
        <!--Default scheme-->
        <local-scheme>
            <scheme-name>local:default</scheme-name>
            <class-name>com.atlassian.confluence.cache.tangosol.ExpiryCountingLocalCache</class-name>
            <eviction-policy>HYBRID</eviction-policy>
            <high-units>1000</high-units>
            <expiry-delay>3600</expiry-delay>
        </local-scheme>
        <replicated-scheme>
            <scheme-name>default</scheme-name>
            <service-name>ReplicatedCache</service-name>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                </local-scheme>
            </backing-map-scheme>
            <standard-lease-milliseconds>600000</standard-lease-milliseconds>
        </replicated-scheme>
        <!--Common schemes-->
        <replicated-scheme>
            <scheme-name>large</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>10000</high-units>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>
        <replicated-scheme>
            <scheme-name>medium</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>5000</high-units>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>
        <replicated-scheme>
            <scheme-name>large-transient</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>10000</high-units>
                    <expiry-delay>300s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>

        <replicated-scheme>
            <scheme-name>user</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>5000</high-units>
                    <expiry-delay>300s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>

        <replicated-scheme>
            <scheme-name>unlimited-permanent</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>0</high-units>
                    <expiry-delay>0</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>

        <replicated-scheme>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>5000</high-units>
                    <expiry-delay>300s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>
        <!--Custom schemes-->


        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.links.DefaultReferralManager.hotReferrers</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <expiry-delay>600s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>


        <replicated-scheme>
            <scheme-name>cache:com.atlassian.bandana.BandanaPersister</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>200</high-units>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>
        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.spaces.persistence.dao.SpaceDao.getSpace()</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <expiry-delay>0s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>
        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.core.CachingInheritedContentPermissionManager.getInheritedContentPermissionSets()</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>10000</high-units>
                    <expiry-delay>0s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>


        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.user.DefaultUserAccessor.deactivatedUsers</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>100000</high-units>
                    <expiry-delay>0s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>

        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.core.ContentEntityObject</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>5000</high-units>
                    <expiry-delay>0s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>
        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.core.ContentEntityObject.bodyContents</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <expiry-delay>0s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>


        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.core.BodyContent</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <expiry-delay>0s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>


        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.security.CachingSpacePermissionManager.permissions</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>5000</high-units>
                    <expiry-delay>1200s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>

        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.rpc.auth.TokenAuthenticationManager.tokens</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>5000</high-units>
                    <expiry-delay>1800s</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>

        <replicated-scheme>
            <scheme-name>cache:com.atlassian.confluence.published-cache</scheme-name>
            <scheme-ref>default</scheme-ref>
            <backing-map-scheme>
                <local-scheme>
                    <scheme-ref>local:default</scheme-ref>
                    <high-units>0</high-units>
                    <expiry-delay>0</expiry-delay>
                </local-scheme>
            </backing-map-scheme>
        </replicated-scheme>

        <!-- Node local schemes -->

        <local-scheme>
            <scheme-name>cache:com.atlassian.confluence.util.velocity.ConfluenceVelocityResourceCache</scheme-name>
            <scheme-ref>local:default</scheme-ref>
            <high-units>300</high-units>
            <expiry-delay>1800s</expiry-delay>
        </local-scheme>

    </caching-schemes>
</cache-config>