AnsweredAssumed Answered

Disable repository caches?

Question asked by kring on Mar 5, 2019
Latest reply on Mar 7, 2019 by kring

Hi,

 

Is there a way to globally disable the caches in the repository?

(Alfresco Community 6.1)

 

As far as I understand, it is possible to disable the repository caches (approximately 50 in total) one by one by overriding the appropriate beans that configures the caches, i.e. override the beans in tx-cache-context.xml like this:

 

For example, this bean

<bean name="propertyValueCache" class="org.alfresco.repo.cache.TransactionalCache">
  <property name="sharedCache">
    <ref bean="propertyValueSharedCache" />
  </property>
  <property name="name">
    <value>org.alfresco.cache.propertyValueTransactionalCache</value>
  </property>
  <property name="maxCacheSize" value="${cache.propertyValueCache.tx.maxItems}" />
  <property name="mutable" value="true" />
  <property name="disableSharedCache" value="${system.cache.disableMutableSharedCaches}" />
  <property name="tenantAware" value="false" />
  <property name="cacheStats" ref="cacheStatistics"/>
  <property name="cacheStatsEnabled" value="${cache.propertyValueCache.tx.statsEnabled}"/>
</bean>

could be changed into

<bean name="propertyValueCache" class="org.alfresco.repo.cache.NullCache">

I guess, I could do it like this (is that correct?) but if there is an easier way to disable all the repository caches in one go that would be more convenient.

 

The reason I ask this question is that I would like to try to run two (or more) Alfresco Community repositories in parallel with a load balancer in front - and this will not be possible as long as the repository caches are enabled, since this would lead to caches that are out of sync in the repository instances (and hence data inconsistencies).

 

Best regards

Andreas

Outcomes