You can optimize a site’s performance after a switch deployment by enabling selective cache invalidation on target repositories. A repository that is thus configured invalidates its item caches selectively during deployment, rather than invalidating the contents of those caches entirely.
If enabled:
Only those cached items that change as a result of the deployment are invalidated. All other cached items remain unchanged. Because selective invalidation increases deployment overhead, you might want to configure a threshold for the number of invalidated items. On exceeding that threshold—the sum of all changed items in a deployment—the selective invalidation process is skipped and the deployment invalidates all cached items in the target repositories.
If not enabled:
Item caches of all deployed repositories are invalidated. This can result in slow response time to initial requests, as fresh data is obtained directly from the database.
Constraints
Two general constraints apply to usage of selective cache invalidation:
Selective cache invalidation only applies to item descriptors that use simple caching mode.
The
atg.repository.RepositoryImplmethodinvalidateCaches()clears all caches from the target repository, even if selective cache invalidation is enabled for that repository.
Configuration Steps
You configure selective cache invalidation on the production server and the asset management server, as follows:
On each production site repository, set the
GSARepositorypropertyselectiveCacheInvalidationEnabledtotrue. By default, this property is set tofalse.Note: You can use the
liveconfigconfiguration layer to enable selective cache invalidation on desired repositories. As installed, theliveconfigconfiguration layer enables selective cache invalidation on certain ATG repositories such asproductCatalog.On the asset management server, configure the item invalidation threshold by setting the
thresholdproperty to a positive integer in this component:/atg/epub/sci/ServerSCIThresholdControllerThe default setting of
-1allows an unlimited number of item invalidations.
Excluding Repositories and Item Descriptors
A production site publishing agent can be configured to exclude specific repositories and item descriptors from selective cache invalidation—in other words, require that item caches be fully invalidated on each deployment. To do so, set the property fullInvalidationRepositoryPaths in this component:
/atg/epub/sci/AgentSCIThresholdController
You set this property as follows:
fullInvalidationRepositoryPaths=\repository-path[=item-descriptor[;item-descriptor]...]\[,...]
repository-pathis the path to a repository.item-descriptorspecifies which item caches in that repository to invalidate on each deployment.
If no item descriptors are supplied, all item caches in the repository are invalidated. The property can specify multiple comma-delimited repositories, and each repository can specify multiple semi-colon-delimited item descriptors.
For example:
fullInvalidationRepositoryPaths=\ /atg/commerce/catalog/ProductCatalog=category;product

