mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged from branch DEV/mward/head_cachefactory_conf to HEAD
54858: ALF-19668: Further cache configuration overrides 54859: ALF-19668: added clustered cache types to properties, e.g. createLocalCache, createCache, createInvalidateRemovalCache. 54867: ALF-19668: ClusterAwareCacheFactory now uses *.cluster.type properties to determine cache type. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55148 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for Property entities -->
|
||||
|
||||
<bean name="propertyValueSharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="propertyValueSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.propertyValueCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for Property Unique Contexts -->
|
||||
|
||||
<bean name="propertyUniqueContextSharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="propertyUniqueContextSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.propertyUniqueContextSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for immutable entities -->
|
||||
|
||||
<bean name="immutableEntitySharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="immutableEntitySharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.immutableEntitySharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -94,13 +94,13 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for Root Nodes -->
|
||||
|
||||
<bean name="node.rootNodesSharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="node.rootNodesSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.node.rootNodesSharedCache"/>
|
||||
</bean>
|
||||
|
||||
<!-- The cross-transaction shared cache for Root Nodes -->
|
||||
|
||||
<bean name="node.allRootNodesSharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="node.allRootNodesSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.node.allRootNodesSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for Nodes -->
|
||||
|
||||
<bean name="node.nodesSharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="node.nodesSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.node.nodesSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for Node Aspects -->
|
||||
|
||||
<bean name="node.aspectsSharedCache" factory-bean="cacheFactory" factory-method="createLocalCache">
|
||||
<bean name="node.aspectsSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.node.aspectsSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for Node Properties -->
|
||||
|
||||
<bean name="node.propertiesSharedCache" factory-bean="cacheFactory" factory-method="createLocalCache">
|
||||
<bean name="node.propertiesSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.node.propertiesSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for Child-by-name -->
|
||||
|
||||
<bean name="node.childByNameSharedCache" factory-bean="cacheFactory" factory-method="createLocalCache">
|
||||
<bean name="node.childByNameSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.node.childByNameSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for User Authorities -->
|
||||
|
||||
<bean name="userToAuthoritySharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="userToAuthoritySharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.userToAuthoritySharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for authority containers -->
|
||||
|
||||
<bean name="authoritySharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="authoritySharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.authoritySharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for authority containers -->
|
||||
|
||||
<bean name="authorityToChildAuthoritySharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="authorityToChildAuthoritySharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.authorityToChildAuthoritySharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for authority containers -->
|
||||
|
||||
<bean name="zoneToAuthoritySharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="zoneToAuthoritySharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.zoneToAuthoritySharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for Dictionary Models -->
|
||||
|
||||
<bean name="compiledModelsCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="compiledModelsCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.compiledModelsSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -384,11 +384,11 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for In-Memory WebScripts Registry -->
|
||||
|
||||
<bean name="webScriptsRegistryCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="webScriptsRegistryCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.webScriptsRegistrySharedCache"/>
|
||||
</bean>
|
||||
|
||||
<bean name="publicapi.webScriptsRegistryCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="publicapi.webScriptsRegistryCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.publicapi.webScriptsRegistryCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
AbstractRoutingContentStore.selectReadStore(String) will correct incorrect/missing cache entries
|
||||
and it doesn't really make sense to try to replicate or Serialize a ContentStore implementation.
|
||||
-->
|
||||
<bean name="routingContentStoreSharedCache" factory-bean="cacheFactory" factory-method="createLocalCache">
|
||||
<bean name="routingContentStoreSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.routingContentStoreSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -433,7 +433,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for IMAP messages -->
|
||||
|
||||
<bean name="imapMessageSharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="imapMessageSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.imapMessageSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -453,7 +453,7 @@
|
||||
|
||||
<!-- The cross-transaction shared cache for immutable (tenant-aware) singletons -->
|
||||
|
||||
<bean name="immutableSingletonSharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="immutableSingletonSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.immutableSingletonSharedCache"/>
|
||||
</bean>
|
||||
|
||||
@@ -463,11 +463,11 @@
|
||||
</bean>
|
||||
|
||||
|
||||
<bean name="contentDiskDriver.fileInfoCache" factory-bean="cacheFactory" factory-method="createLocalCache">
|
||||
<bean name="contentDiskDriver.fileInfoCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.contentDiskDriver.fileInfoCache"/>
|
||||
</bean>
|
||||
|
||||
<bean name="globalConfigSharedCache" factory-bean="cacheFactory" factory-method="createInvalidateRemovalCache">
|
||||
<bean name="globalConfigSharedCache" factory-bean="cacheFactory" factory-method="createCache">
|
||||
<constructor-arg value="cache.globalConfigSharedCache"/>
|
||||
</bean>
|
||||
|
||||
|
@@ -7,95 +7,114 @@ cache.propertyValueCache.tx.maxItems=1000
|
||||
cache.propertyValueCache.maxItems=10000
|
||||
cache.propertyValueCache.timeToLiveSeconds=0
|
||||
cache.propertyValueCache.maxIdleSeconds=0
|
||||
cache.propertyValueCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.contentDataSharedCache.tx.maxItems=65000
|
||||
cache.contentDataSharedCache.maxItems=130000
|
||||
cache.contentDataSharedCache.timeToLiveSeconds=0
|
||||
cache.contentDataSharedCache.maxIdleSeconds=0
|
||||
cache.contentDataSharedCache.cluster.type=createCache
|
||||
|
||||
cache.immutableEntitySharedCache.tx.maxItems=10000
|
||||
cache.immutableEntitySharedCache.maxItems=50000
|
||||
cache.immutableEntitySharedCache.timeToLiveSeconds=0
|
||||
cache.immutableEntitySharedCache.maxIdleSeconds=0
|
||||
cache.immutableEntitySharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.node.rootNodesSharedCache.tx.maxItems=1000
|
||||
cache.node.rootNodesSharedCache.maxItems=1000
|
||||
cache.node.rootNodesSharedCache.timeToLiveSeconds=0
|
||||
cache.node.rootNodesSharedCache.maxIdleSeconds=0
|
||||
cache.node.rootNodesSharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.node.allRootNodesSharedCache.tx.maxItems=500
|
||||
cache.node.allRootNodesSharedCache.maxItems=1000
|
||||
cache.node.allRootNodesSharedCache.timeToLiveSeconds=0
|
||||
cache.node.allRootNodesSharedCache.maxIdleSeconds=0
|
||||
cache.node.allRootNodesSharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.node.nodesSharedCache.tx.maxItems=125000
|
||||
cache.node.nodesSharedCache.maxItems=250000
|
||||
cache.node.nodesSharedCache.timeToLiveSeconds=0
|
||||
cache.node.nodesSharedCache.maxIdleSeconds=0
|
||||
cache.node.nodesSharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.node.aspectsSharedCache.tx.maxItems=65000
|
||||
cache.node.aspectsSharedCache.maxItems=130000
|
||||
cache.node.aspectsSharedCache.timeToLiveSeconds=0
|
||||
cache.node.aspectsSharedCache.maxIdleSeconds=0
|
||||
cache.node.aspectsSharedCache.cluster.type=createLocalCache
|
||||
|
||||
cache.node.propertiesSharedCache.tx.maxItems=65000
|
||||
cache.node.propertiesSharedCache.maxItems=130000
|
||||
cache.node.propertiesSharedCache.timeToLiveSeconds=0
|
||||
cache.node.propertiesSharedCache.maxIdleSeconds=0
|
||||
cache.node.propertiesSharedCache.cluster.type=createLocalCache
|
||||
|
||||
cache.node.parentAssocsSharedCache.maxItems=130000
|
||||
cache.node.parentAssocsSharedCache.timeToLiveSeconds=0
|
||||
cache.node.parentAssocsSharedCache.maxIdleSeconds=0
|
||||
cache.node.parentAssocsSharedCache.cluster.type=createCache
|
||||
|
||||
cache.node.childByNameSharedCache.tx.maxItems=65000
|
||||
cache.node.childByNameSharedCache.maxItems=130000
|
||||
cache.node.childByNameSharedCache.timeToLiveSeconds=0
|
||||
cache.node.childByNameSharedCache.maxIdleSeconds=0
|
||||
cache.node.childByNameSharedCache.cluster.type=createLocalCache
|
||||
|
||||
cache.userToAuthoritySharedCache.tx.maxItems=100
|
||||
cache.userToAuthoritySharedCache.maxItems=5000
|
||||
cache.userToAuthoritySharedCache.timeToLiveSeconds=0
|
||||
cache.userToAuthoritySharedCache.maxIdleSeconds=0
|
||||
cache.userToAuthoritySharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.authenticationSharedCache.tx.maxItems=100
|
||||
cache.authenticationSharedCache.maxItems=5000
|
||||
cache.authenticationSharedCache.timeToLiveSeconds=0
|
||||
cache.authenticationSharedCache.maxIdleSeconds=0
|
||||
cache.authenticationSharedCache.cluster.type=createCache
|
||||
|
||||
cache.authoritySharedCache.tx.maxItems=10000
|
||||
cache.authoritySharedCache.maxItems=10000
|
||||
cache.authoritySharedCache.timeToLiveSeconds=0
|
||||
cache.authoritySharedCache.maxIdleSeconds=0
|
||||
cache.authoritySharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.authorityToChildAuthoritySharedCache.tx.maxItems=40000
|
||||
cache.authorityToChildAuthoritySharedCache.maxItems=40000
|
||||
cache.authorityToChildAuthoritySharedCache.timeToLiveSeconds=0
|
||||
cache.authorityToChildAuthoritySharedCache.maxIdleSeconds=0
|
||||
cache.authorityToChildAuthoritySharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.zoneToAuthoritySharedCache.tx.maxItems=500
|
||||
cache.zoneToAuthoritySharedCache.maxItems=500
|
||||
cache.zoneToAuthoritySharedCache.timeToLiveSeconds=0
|
||||
cache.zoneToAuthoritySharedCache.maxIdleSeconds=0
|
||||
cache.zoneToAuthoritySharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.permissionsAccessSharedCache.tx.maxItems=10000
|
||||
cache.permissionsAccessSharedCache.maxItems=50000
|
||||
cache.permissionsAccessSharedCache.timeToLiveSeconds=0
|
||||
cache.permissionsAccessSharedCache.maxIdleSeconds=0
|
||||
cache.permissionsAccessSharedCache.cluster.type=createCache
|
||||
|
||||
cache.readersSharedCache.tx.maxItems=10000
|
||||
cache.readersSharedCache.maxItems=10000
|
||||
cache.readersSharedCache.timeToLiveSeconds=0
|
||||
cache.readersSharedCache.maxIdleSeconds=0
|
||||
cache.readersSharedCache.cluster.type=createCache
|
||||
|
||||
cache.readersDeniedSharedCache.tx.maxItems=10000
|
||||
cache.readersDeniedSharedCache.maxItems=10000
|
||||
cache.readersDeniedSharedCache.timeToLiveSeconds=0
|
||||
cache.readersDeniedSharedCache.maxIdleSeconds=0
|
||||
cache.readersDeniedSharedCache.cluster.type=createCache
|
||||
|
||||
cache.nodeOwnerSharedCache.tx.maxItems=40000
|
||||
cache.nodeOwnerSharedCache.maxItems=40000
|
||||
cache.nodeOwnerSharedCache.timeToLiveSeconds=0
|
||||
cache.nodeOwnerSharedCache.maxIdleSeconds=0
|
||||
cache.nodeOwnerSharedCache.cluster.type=createCache
|
||||
|
||||
cache.nodeRulesSharedCache.tx.maxItems=2000
|
||||
|
||||
@@ -103,29 +122,35 @@ cache.personSharedCache.tx.maxItems=1000
|
||||
cache.personSharedCache.maxItems=1000
|
||||
cache.personSharedCache.timeToLiveSeconds=0
|
||||
cache.personSharedCache.maxIdleSeconds=0
|
||||
cache.personSharedCache.cluster.type=createCache
|
||||
|
||||
cache.ticketsCache.maxItems=1000
|
||||
cache.ticketsCache.timeToLiveSeconds=0
|
||||
cache.ticketsCache.maxIdleSeconds=0
|
||||
cache.ticketsCache.cluster.type=createCache
|
||||
|
||||
cache.avmEntitySharedCache.tx.maxItems=5000
|
||||
cache.avmEntitySharedCache.maxItems=5000
|
||||
cache.avmEntitySharedCache.timeToLiveSeconds=0
|
||||
cache.avmEntitySharedCache.maxIdleSeconds=0
|
||||
cache.avmEntitySharedCache.cluster.type=createCache
|
||||
|
||||
cache.avmVersionRootEntitySharedCache.maxItems=1000
|
||||
cache.avmVersionRootEntitySharedCache.timeToLiveSeconds=0
|
||||
cache.avmVersionRootEntitySharedCache.maxIdleSeconds=0
|
||||
cache.avmVersionRootEntitySharedCache.cluster.type=createCache
|
||||
|
||||
cache.avmNodeSharedCache.tx.maxItems=5000
|
||||
cache.avmNodeSharedCache.maxItems=5000
|
||||
cache.avmNodeSharedCache.timeToLiveSeconds=0
|
||||
cache.avmNodeSharedCache.maxIdleSeconds=0
|
||||
cache.avmNodeSharedCache.cluster.type=createCache
|
||||
|
||||
cache.avmNodeAspectsSharedCache.tx.maxItems=5000
|
||||
cache.avmNodeAspectsSharedCache.maxItems=5000
|
||||
cache.avmNodeAspectsSharedCache.timeToLiveSeconds=0
|
||||
cache.avmNodeAspectsSharedCache.maxIdleSeconds=0
|
||||
cache.avmNodeAspectsSharedCache.cluster.type=createCache
|
||||
|
||||
cache.avmStoreSharedCache.tx.maxItems=1000
|
||||
|
||||
@@ -137,80 +162,97 @@ cache.webServicesQuerySessionSharedCache.tx.maxItems=50
|
||||
cache.webServicesQuerySessionSharedCache.maxItems=1000
|
||||
cache.webServicesQuerySessionSharedCache.timeToLiveSeconds=0
|
||||
cache.webServicesQuerySessionSharedCache.maxIdleSeconds=0
|
||||
cache.webServicesQuerySessionSharedCache.cluster.type=createCache
|
||||
|
||||
cache.aclSharedCache.tx.maxItems=20000
|
||||
cache.aclSharedCache.maxItems=50000
|
||||
cache.aclSharedCache.timeToLiveSeconds=0
|
||||
cache.aclSharedCache.maxIdleSeconds=0
|
||||
cache.aclSharedCache.cluster.type=createCache
|
||||
|
||||
cache.aclEntitySharedCache.tx.maxItems=50000
|
||||
cache.aclEntitySharedCache.maxItems=50000
|
||||
cache.aclEntitySharedCache.timeToLiveSeconds=0
|
||||
cache.aclEntitySharedCache.maxIdleSeconds=0
|
||||
cache.aclEntitySharedCache.cluster.type=createCache
|
||||
|
||||
cache.resourceBundleBaseNamesSharedCache.tx.maxItems=1000
|
||||
cache.resourceBundleBaseNamesSharedCache.maxItems=1000
|
||||
cache.resourceBundleBaseNamesSharedCache.timeToLiveSeconds=0
|
||||
cache.resourceBundleBaseNamesSharedCache.maxIdleSeconds=0
|
||||
cache.resourceBundleBaseNamesSharedCache.cluster.type=createCache
|
||||
|
||||
cache.loadedResourceBundlesSharedCache.tx.maxItems=1000
|
||||
cache.loadedResourceBundlesSharedCache.maxItems=1000
|
||||
cache.loadedResourceBundlesSharedCache.timeToLiveSeconds=0
|
||||
cache.loadedResourceBundlesSharedCache.maxIdleSeconds=0
|
||||
cache.loadedResourceBundlesSharedCache.cluster.type=createCache
|
||||
|
||||
cache.messagesSharedCache.tx.maxItems=1000
|
||||
cache.messagesSharedCache.maxItems=1000
|
||||
cache.messagesSharedCache.timeToLiveSeconds=0
|
||||
cache.messagesSharedCache.maxIdleSeconds=0
|
||||
cache.messagesSharedCache.cluster.type=createCache
|
||||
|
||||
cache.compiledModelsSharedCache.maxItems=1000
|
||||
cache.compiledModelsSharedCache.timeToLiveSeconds=0
|
||||
cache.compiledModelsSharedCache.maxIdleSeconds=0
|
||||
cache.compiledModelsSharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.webScriptsRegistrySharedCache.maxItems=1000
|
||||
cache.webScriptsRegistrySharedCache.timeToLiveSeconds=0
|
||||
cache.webScriptsRegistrySharedCache.maxIdleSeconds=0
|
||||
cache.webScriptsRegistrySharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.routingContentStoreSharedCache.tx.maxItems=10000
|
||||
cache.routingContentStoreSharedCache.maxItems=10000
|
||||
cache.routingContentStoreSharedCache.timeToLiveSeconds=0
|
||||
cache.routingContentStoreSharedCache.maxIdleSeconds=0
|
||||
cache.routingContentStoreSharedCache.cluster.type=createLocalCache
|
||||
|
||||
cache.executingActionsCache.maxItems=1000
|
||||
cache.executingActionsCache.timeToLiveSeconds=0
|
||||
cache.executingActionsCache.maxIdleSeconds=0
|
||||
cache.executingActionsCache.cluster.type=createCache
|
||||
|
||||
cache.tagscopeSummarySharedCache.tx.maxItems=1000
|
||||
cache.tagscopeSummarySharedCache.maxItems=1000
|
||||
cache.tagscopeSummarySharedCache.timeToLiveSeconds=0
|
||||
cache.tagscopeSummarySharedCache.maxIdleSeconds=0
|
||||
cache.tagscopeSummarySharedCache.cluster.type=createCache
|
||||
|
||||
cache.imapMessageSharedCache.tx.maxItems=1000
|
||||
cache.imapMessageSharedCache.maxItems=2000
|
||||
cache.imapMessageSharedCache.timeToLiveSeconds=0
|
||||
cache.imapMessageSharedCache.maxIdleSeconds=0
|
||||
cache.imapMessageSharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.tenantEntitySharedCache.tx.maxItems=1000
|
||||
cache.tenantEntitySharedCache.maxItems=1000
|
||||
cache.tenantEntitySharedCache.timeToLiveSeconds=0
|
||||
cache.tenantEntitySharedCache.maxIdleSeconds=0
|
||||
cache.tenantEntitySharedCache.cluster.type=createCache
|
||||
|
||||
cache.immutableSingletonSharedCache.tx.maxItems=12000
|
||||
cache.immutableSingletonSharedCache.maxItems=12000
|
||||
cache.immutableSingletonSharedCache.timeToLiveSeconds=0
|
||||
cache.immutableSingletonSharedCache.maxIdleSeconds=0
|
||||
cache.immutableSingletonSharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.remoteAlfrescoTicketService.ticketsCache.maxItems=1000
|
||||
cache.remoteAlfrescoTicketService.ticketsCache.timeToLiveSeconds=0
|
||||
cache.remoteAlfrescoTicketService.ticketsCache.maxIdleSeconds=0
|
||||
cache.remoteAlfrescoTicketService.ticketsCache.cluster.type=createCache
|
||||
|
||||
cache.contentDiskDriver.fileInfoCache.maxItems=1000
|
||||
cache.contentDiskDriver.fileInfoCache.timeToLiveSeconds=0
|
||||
cache.contentDiskDriver.fileInfoCache.maxIdleSeconds=0
|
||||
cache.contentDiskDriver.fileInfoCache.cluster.type=createLocalCache
|
||||
|
||||
cache.globalConfigSharedCache.maxItems=1000
|
||||
cache.globalConfigSharedCache.timeToLiveSeconds=0
|
||||
cache.globalConfigSharedCache.maxIdleSeconds=0
|
||||
cache.globalConfigSharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.permissionEntitySharedCache.tx.maxItems=50000
|
||||
|
||||
@@ -218,22 +260,27 @@ cache.propertyUniqueContextSharedCache.tx.maxItems=10000
|
||||
cache.propertyUniqueContextSharedCache.maxItems=10000
|
||||
cache.propertyUniqueContextSharedCache.timeToLiveSeconds=0
|
||||
cache.propertyUniqueContextSharedCache.maxIdleSeconds=0
|
||||
cache.propertyUniqueContextSharedCache.cluster.type=createInvalidateRemovalCache
|
||||
|
||||
cache.siteNodeRefSharedCache.tx.maxItems=5000
|
||||
cache.siteNodeRefSharedCache.maxItems=5000
|
||||
cache.siteNodeRefSharedCache.timeToLiveSeconds=0
|
||||
cache.siteNodeRefSharedCache.maxIdleSeconds=0
|
||||
cache.siteNodeRefSharedCache.cluster.type=createCache
|
||||
|
||||
cache.samlTrustEngineSharedCache.tx.maxItems=5000
|
||||
cache.samlTrustEngineSharedCache.maxItems=5000
|
||||
cache.samlTrustEngineSharedCache.timeToLiveSeconds=0
|
||||
cache.samlTrustEngineSharedCache.maxIdleSeconds=0
|
||||
cache.samlTrustEngineSharedCache.cluster.type=createCache
|
||||
|
||||
# Caching content store, see caching-content-store-context.xml.sample*
|
||||
cache.cachingContentStoreCache.maxItems=5000
|
||||
cache.cachingContentStoreCache.timeToLiveSeconds=0
|
||||
cache.cachingContentStoreCache.maxIdleSeconds=86400
|
||||
cache.cachingContentStoreCache.cluster.type=createCache
|
||||
|
||||
cache.publicapi.webScriptsRegistryCache.maxItems=1000
|
||||
cache.publicapi.webScriptsRegistryCache.timeToLiveSeconds=0
|
||||
cache.publicapi.webScriptsRegistryCache.maxIdleSeconds=0
|
||||
cache.publicapi.webScriptsRegistryCache.cluster.type=createInvalidateRemovalCache
|
||||
|
62
source/java/org/alfresco/repo/cache/AbstractCacheFactory.java
vendored
Normal file
62
source/java/org/alfresco/repo/cache/AbstractCacheFactory.java
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2013 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.repo.cache;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* Abstract {@link CacheFactory} implementation containing common functionality
|
||||
* such as cache configuration properties support.
|
||||
*
|
||||
* @author Matt Ward
|
||||
*/
|
||||
public abstract class AbstractCacheFactory<K extends Serializable, V> implements CacheFactory<K, V>
|
||||
{
|
||||
private static final String PROP_SEPERATOR = ".";
|
||||
private Properties properties;
|
||||
|
||||
public String getProperty(String cacheName, String propName, final String defaultValue)
|
||||
{
|
||||
final String fqPropName = cacheName + PROP_SEPERATOR + propName;
|
||||
String value = properties.getProperty(fqPropName);
|
||||
if (value != null)
|
||||
{
|
||||
value = value.trim();
|
||||
}
|
||||
if (value == null || value.isEmpty())
|
||||
{
|
||||
value = defaultValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide properties to parameterize cache creation. Cache properties are prefixed
|
||||
* with the cacheName supplied when invoking {@link DefaultCacheFactory#createCache(String)}.
|
||||
* For example, for a cache named cache.ticketsCache the property cache.ticketsCache.maxItems
|
||||
* will determine the capacity of the cache.
|
||||
*
|
||||
* @param properties
|
||||
*/
|
||||
public void setProperties(Properties properties)
|
||||
{
|
||||
this.properties = properties;
|
||||
}
|
||||
}
|
@@ -30,33 +30,11 @@ import java.io.Serializable;
|
||||
public interface CacheFactory<K extends Serializable, V>
|
||||
{
|
||||
/**
|
||||
* Creates a fully distributed cache (when clustering is enabled and active).
|
||||
* Creates a cache. The type of cache (e.g. localised, clustered etc.) produced is
|
||||
* dependant on the factory implementation, and will vary at runtime.
|
||||
*
|
||||
* @param cacheName
|
||||
* @return SimpleCache
|
||||
*/
|
||||
SimpleCache<K, V> createCache(String cacheName);
|
||||
|
||||
/**
|
||||
* Creates a "local" cache, i.e. one that exists only on the JVM that created it. It does not
|
||||
* attempt to replicate any data, send invalidation messages etc. and is intended for use
|
||||
* only where the data does not need to be shared and where remote operations should be avoided for
|
||||
* performance reasons.
|
||||
*
|
||||
* @param cacheName
|
||||
* @return SimpleCache
|
||||
*/
|
||||
SimpleCache<K, V> createLocalCache(String cacheName);
|
||||
|
||||
/**
|
||||
* <p>Creates a local (as opposed to fully-distributed) cache that broadcasts invalidation messages
|
||||
* to its peers on other cluster members upon cache item removal. Its peers then remove the
|
||||
* corresponding cache item.</p>
|
||||
*
|
||||
* <p>This cache does <strong>not</strong> replicate put(k,v) invocations.</p>
|
||||
*
|
||||
* @param cacheName
|
||||
* @return SimpleCache
|
||||
*/
|
||||
SimpleCache<K, V> createInvalidateRemovalCache(String cacheName);
|
||||
}
|
||||
|
@@ -32,10 +32,10 @@ import org.apache.commons.logging.LogFactory;
|
||||
*
|
||||
* @author Matt Ward
|
||||
*/
|
||||
public class DefaultCacheFactory<K extends Serializable, V> implements CacheFactory<K, V>
|
||||
public class DefaultCacheFactory<K extends Serializable, V> extends AbstractCacheFactory<K, V>
|
||||
{
|
||||
private static final Log log = LogFactory.getLog(DefaultCacheFactory.class);
|
||||
private Properties properties;
|
||||
|
||||
|
||||
@Override
|
||||
public SimpleCache<K, V> createCache(String cacheName)
|
||||
@@ -43,8 +43,7 @@ public class DefaultCacheFactory<K extends Serializable, V> implements CacheFact
|
||||
return createLocalCache(cacheName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleCache<K, V> createLocalCache(String cacheName)
|
||||
private SimpleCache<K, V> createLocalCache(String cacheName)
|
||||
{
|
||||
DefaultSimpleCache<K, V> cache = new DefaultSimpleCache<K, V>();
|
||||
cache.setCacheName(cacheName);
|
||||
@@ -61,34 +60,10 @@ public class DefaultCacheFactory<K extends Serializable, V> implements CacheFact
|
||||
return cache;
|
||||
}
|
||||
|
||||
private SimpleCache<K, V> createInvalidatingCache(String cacheName)
|
||||
{
|
||||
return createLocalCache(cacheName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SimpleCache<K, V> createInvalidateRemovalCache(String cacheName)
|
||||
{
|
||||
return createLocalCache(cacheName);
|
||||
}
|
||||
|
||||
private int maxItems(String cacheName)
|
||||
{
|
||||
String maxItemsStr = properties.getProperty(cacheName + ".maxItems");
|
||||
Integer maxItems = maxItemsStr != null ? Integer.parseInt(maxItemsStr) : 0;
|
||||
String maxItemsStr = getProperty(cacheName, "maxItems", "0");
|
||||
Integer maxItems = Integer.parseInt(maxItemsStr);
|
||||
return maxItems.intValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide properties to parameterize cache creation. Cache properties are prefixed
|
||||
* with the cacheName supplied when invoking {@link DefaultCacheFactory#createCache(String)}.
|
||||
* For example, for a cache named cache.ticketsCache the property cache.ticketsCache.maxItems
|
||||
* will determine the capacity of the cache.
|
||||
*
|
||||
* @param properties
|
||||
*/
|
||||
public void setProperties(Properties properties)
|
||||
{
|
||||
this.properties = properties;
|
||||
}
|
||||
}
|
||||
|
79
source/test-java/org/alfresco/repo/cache/AbstractCacheFactoryTest.java
vendored
Normal file
79
source/test-java/org/alfresco/repo/cache/AbstractCacheFactoryTest.java
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
package org.alfresco.repo.cache;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
public class AbstractCacheFactoryTest
|
||||
{
|
||||
// The class under test.
|
||||
private AbstractCacheFactory<Integer, String> cacheFactory;
|
||||
private Properties properties;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
cacheFactory = new CacheFactoryTestImpl();
|
||||
|
||||
properties = new Properties();
|
||||
cacheFactory.setProperties(properties);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nullPropertyYieldsDefault()
|
||||
{
|
||||
// Null property, null default
|
||||
assertNull(cacheFactory.getProperty("the.cache.name", "noProperty", null));
|
||||
|
||||
// Null property, non-empty default
|
||||
assertEquals("non-empty-default", cacheFactory.getProperty("the.cache.name", "noProperty", "non-empty-default"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void emptyPropertyYieldsDefault()
|
||||
{
|
||||
// Empty property, empty default
|
||||
properties.setProperty("the.cache.name.emptyProperty", "");
|
||||
assertEquals("", cacheFactory.getProperty("the.cache.name", "emptyProperty", ""));
|
||||
|
||||
// Empty property, null default
|
||||
properties.setProperty("the.cache.name.emptyProperty", "");
|
||||
assertEquals(null, cacheFactory.getProperty("the.cache.name", "emptyProperty", null));
|
||||
|
||||
// Empty property, non-empty default
|
||||
properties.setProperty("the.cache.name.emptyProperty", "");
|
||||
assertEquals("non-empty-default", cacheFactory.getProperty("the.cache.name", "emptyProperty", "non-empty-default"));
|
||||
|
||||
// Empty/whitespace property
|
||||
properties.setProperty("the.cache.name.emptyProperty", " \t ");
|
||||
assertEquals("default", cacheFactory.getProperty("the.cache.name", "emptyProperty", "default"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nonEmptyPropertyIsReturned()
|
||||
{
|
||||
// Non-empty property
|
||||
properties.setProperty("the.cache.name.nonEmpty", "this has a non-empty value");
|
||||
assertEquals("this has a non-empty value", cacheFactory.getProperty("the.cache.name", "nonEmpty", "default"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nonEmptyPropertyIsTrimmedOfWhitespace()
|
||||
{
|
||||
properties.setProperty("the.cache.name.nonEmpty", " \t value \t");
|
||||
assertEquals("value", cacheFactory.getProperty("the.cache.name", "nonEmpty", "default"));
|
||||
}
|
||||
|
||||
|
||||
private static class CacheFactoryTestImpl extends AbstractCacheFactory<Integer, String>
|
||||
{
|
||||
@Override
|
||||
public SimpleCache createCache(String cacheName)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@@ -52,28 +52,4 @@ public class DefaultCacheFactoryTest
|
||||
assertEquals(4, cache.getMaxItems());
|
||||
assertEquals("cache.someCache", cache.getCacheName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canCreateLocalCache()
|
||||
{
|
||||
cache = (DefaultSimpleCache<String, String>) cacheFactory.createLocalCache("cache.someCache");
|
||||
assertEquals(4, cache.getMaxItems());
|
||||
assertEquals("cache.someCache", cache.getCacheName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canCreateInvalidatingCache()
|
||||
{
|
||||
cache = (DefaultSimpleCache<String, String>) cacheFactory.createInvalidateRemovalCache("cache.someCache");
|
||||
assertEquals(4, cache.getMaxItems());
|
||||
assertEquals("cache.someCache", cache.getCacheName());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void canCreateInvalidateRemovalCache()
|
||||
{
|
||||
cache = (DefaultSimpleCache<String, String>) cacheFactory.createInvalidateRemovalCache("cache.someCache");
|
||||
assertEquals(4, cache.getMaxItems());
|
||||
assertEquals("cache.someCache", cache.getCacheName());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user