The caching content store is defined over the content store selector so that we have one cache for all stores and makes the sample easier to extend when adding more stores.
<bean id="cachingContentStore"
class="org.alfresco.repo.content.caching.CachingContentStore"
init-method="init">
<property name="backingStore" ref="storeSelectorContentStore"/>
<property name="cache" ref="contentCache"/>
<property name="cacheOnInbound" value="true"/>
<property name="quota" ref="standardQuotaManager"/>
</bean>
<bean id="az.contentStoresToClean" class="java.util.ArrayList">
<constructor-arg>
<list>
<ref bean="cachingContentStore" />
</list>
</constructor-arg>
</bean>