Derek Hulley 529c4840e9 Merged V2.0 to HEAD
5297: PostgreSQL upgrade support
   5347: (From 1.4) EHCache configuration fixes and sample
   5380, 5381: AWC-1143
   5398: AWC-966


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5479 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2007-04-11 19:05:40 +00:00

175 lines
6.5 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
Configuration of in-transaction caches along with the shared (cross-transaction) caches.
The in-transaction caches do not share the same configuration as the shared caches.
This is because the shared caches can support replication (EHCache 1.2), while the
in-transaction caches must not use these features.
-->
<beans>
<!-- ==================================================== -->
<!-- EH Cache Manager to produce in-transaction EH Caches -->
<!-- Do not override or cluster -->
<!-- ==================================================== -->
<bean name="transactionalEHCacheManager" class="org.alfresco.repo.cache.EhCacheManagerFactoryBean" >
<property name="configLocation">
<value>classpath:alfresco/ehcache-transactional.xml</value>
</property>
</bean>
<!-- ============================================ -->
<!-- EH Cache Manager to produce shared EH Caches -->
<!-- ============================================ -->
<bean name="internalEHCacheManager" class="org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean" />
<!-- ===================================== -->
<!-- Authority container look up for users -->
<!-- ===================================== -->
<!-- The cross-transaction shared cache for User Authorities -->
<bean name="userToAuthoritySharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager">
<ref bean="internalEHCacheManager" />
</property>
<property name="cacheName">
<value>org.alfresco.cache.userToAuthorityCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for User Authorities -->
<bean name="userToAuthorityCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="userToAuthoritySharedCache" />
</property>
<property name="cacheManager" >
<ref bean="transactionalEHCacheManager" />
</property>
<property name="name">
<value>org.alfresco.userToAuthorityTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>100</value>
</property>
</bean>
<!-- ===================================== -->
<!-- Permissions access cache -->
<!-- ===================================== -->
<!-- The cross-transaction shared cache for Permissions -->
<bean name="permissionsAccessSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager">
<ref bean="internalEHCacheManager" />
</property>
<property name="cacheName">
<value>org.alfresco.cache.permissionsAccessCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for Permissions -->
<bean name="permissionsAccessCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="permissionsAccessSharedCache" />
</property>
<property name="cacheManager" >
<ref bean="transactionalEHCacheManager" />
</property>
<!-- Eh cache area -->
<property name="name">
<value>org.alfresco.permissionsAccessTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>10000</value>
</property>
</bean>
<!-- ===================================== -->
<!-- Node owner cache -->
<!-- ===================================== -->
<!-- The cross-transaction shared cache for Node Ownership -->
<bean name="nodeOwnerSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager">
<ref bean="internalEHCacheManager" />
</property>
<property name="cacheName">
<value>org.alfresco.cache.nodeOwnerCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for Node Ownership -->
<bean name="nodeOwnerCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="nodeOwnerSharedCache" />
</property>
<property name="cacheManager" >
<ref bean="transactionalEHCacheManager" />
</property>
<property name="name">
<value>org.alfresco.nodeOwnerTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>10000</value>
</property>
</bean>
<!-- ===================================== -->
<!-- Authentication Ticket Cache -->
<!-- ===================================== -->
<!-- The cross-transaction shared cache for In-Memory Tickets -->
<bean name="ticketsSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheManager">
<ref bean="internalEHCacheManager" />
</property>
<property name="cacheName">
<value>org.alfresco.cache.ticketsCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for In-Memory Tickets -->
<bean name="ticketsCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="ticketsSharedCache" />
</property>
<property name="cacheManager" >
<ref bean="transactionalEHCacheManager" />
</property>
<property name="name">
<value>org.alfresco.ticketsTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>10</value>
</property>
</bean>
</beans>