ATG Campaign Optimizer uses substitution caching for all page, page fragment, and slot substitutions. ATG Campaign Optimizer for Commerce also uses substitution caching for product and category templates. The cache is configured on a per-session basis and will get re-initialized as users get added to tests or log in. The cache is configured in /atg/abtest/substituter/SubstitutionCache
.
$class=atg.service.cache.Cache
$scope=session
cacheAdapter=/atg/abtest/substituter/SubstitutionCacheAdapter
The ABTestSubstituterUtils
class manages the caches used during substitution. It is possible to configure different caches for each kind of substitution. By default only one cache is used for all substitutions. Each cache is given a name in the utils
class /atg/abtest/substituter/ABTestSubstituterUtils.
caches=\
default=/atg/abtest/substituter/SubstitutionCache
Each substituter uses the default name:
/atg/abtest/substituter/PageSubstituter.substituterCacheKey=default
/atg/abtest/substituter/SlotSubstituter.substituterCacheKey=default
/atg/abtest/substituter/commerce/TemplateSubstituter.
substituterCacheKey=default
The cache itself is a standard ATG cache. For more information, see the SQL Repository Caching chapter of the ATG Repository Guide.
You can configure slot substitution caching separately from page substitution caching by following these steps:
Create a new instance of
atg.service.cache.Cache
.Assign the new instance the same cache adapter:
/atg/abtest/substituter/SubstitutionCacheAdapter
Add the new instance to the
caches
property of/atg/abtest/substituter/ABTestSubstituterUtils
.Change the setting of the
substituterCacheKey
property in/atg/abtest/substituter/SlotSubstituter
.
As is the case with page and page fragments, the cache is automatically flushed on login or whenever a new marker is added to a profile by the AddABTestMarkerToProfile
scenario action.