<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
 
<beans>
   <!-- ==================================================== -->
   <!-- EH Cache Manager to produce in-transaction EH Caches -->
   <!-- ==================================================== -->
   
   <bean name="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" >
      <property name="configLocation">
         <value>classpath:ehcache.xml</value>
      </property>
   </bean>
   
   <!-- ================ -->
   <!-- Null permissoins -->
   <!-- ================ -->
   
   <!-- The cross-transaction shared cache for Null Node Permissions -->
   
   <bean name="nullPermissionSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
      <property name="cache">
         <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
            <property name="cacheName">
               <!-- The name of the ehCache area -->
               <value>nullPermissionCache</value>
            </property>
         </bean>
      </property>
   </bean>
   
   <!-- The transactional cache for Null Node Permissions -->
   
   <bean name="nullPermissionCache" class="org.alfresco.repo.cache.TransactionalCache">
      <property name="sharedCache">
         <ref bean="nullPermissionSharedCache" />
      </property>
      <property name="cacheManager" >
         <ref bean="ehCacheManager" />
      </property>
      <!-- Eh cache area -->
      <property name="name">
         <value>nullPermissionTransactionalCache</value>
      </property>
      <property name="maxCacheSize">
         <value>20000</value>
      </property>
   </bean>
   
   <!-- ===================================== -->
   <!-- Authority container look up for users -->
   <!-- ===================================== -->

   <!-- The cross-transaction shared cache for Users -->
   
   <bean name="userToAuthoritySharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
      <property name="cache">
         <bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
            <property name="cacheName">
               <!-- The name of the ehCache area -->
               <value>userToAuthorityCache</value>
            </property>
         </bean>
      </property>
   </bean>
   
   <!-- The transactional cache for Null Node Permissions -->
   
   <bean name="userToAuthorityCache" class="org.alfresco.repo.cache.TransactionalCache">
      <property name="sharedCache">
         <ref bean="userToAuthoritySharedCache" />
      </property>
      <property name="cacheManager" >
         <ref bean="ehCacheManager" />
      </property>
      <!-- Eh cache area -->
      <property name="name">
         <value>userToAuthorityTransactionalCache</value>
      </property>
      <property name="maxCacheSize">
         <value>20000</value>
      </property>
   </bean>

</beans>