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:
1. Selective cache invalidation only applies to item descriptors that use simple caching mode.
2. The atg.repository.RepositoryImpl method invalidateCaches() 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:
1. On each production site repository, set the GSARepository property
selectiveCacheInvalidationEnabled to true. By default, this property is set to false.
Note: You can use the liveconfig configuration layer to enable selective cache invalidation on desired
Note: You can use the liveconfig configuration layer to enable selective cache invalidation on desired
repositories. As installed, the liveconfig configuration layer enables selective cache invalidation on certain
ATG repositories such as productCatalog.
2. On the asset management server, configure the item invalidation threshold by setting the threshold
2. On the asset management server, configure the item invalidation threshold by setting the threshold
property to a positive integer in this component:
/atg/epub/sci/ServerSCIThresholdController
The default setting of -1 allows an unlimited number of item invalidations.
/atg/epub/sci/ServerSCIThresholdController
The default setting of -1 allows 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-path is the path to a repository.
item-descriptor specifies 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
No comments:
Post a Comment