A multi-server application might require locked caching, where only one ATG instance at a time has write access to the cached data of a given item type. You can use locked caching to prevent multiple servers from trying to update the same item simultaneously—for example, Commerce order items, which can be updated by customers on an external-facing server and by customer service agents on an internal-facing server. By restricting write access, locked caching ensures a consistent view of cached data among all ATG instances.
Prerequisites
Locked caching has the following prerequisites:
Item descriptors that specify locked caching must disable query caching by setting their
query-cache-size
attribute to 0.A repository with item descriptors that use locked caching must be configured to use a ClientLockManager component; otherwise, caching is disabled for those item descriptors. The repository’s
lockManager
property is set to a component of typeatg.service.lockmanager.ClientLockManager
.At least one ClientLockManager on each ATG instance where repositories participate in locked caching must be configured to use a ServerLockManager.
A ServerLockManager component must be configured to manage the locks among participating ATG instances.