This section explains aspects of the process that the cache warming service uses to reload cached data. An overview of the cache warming process is provided below.

The cache warming service reloads cached data that was invalidated by selective cache and full cache invalidation in the same way. The manner in which cached data was invalidated does not affect the way you use or configure cache warming.

Repository Items Selection

The cache warming service affects all cached repository items in switched data sources after a deployment. If you have configured caching for a repository item descriptor and configured a switching data source for the repository that contains it, the cache warming service will attempt to reload the cached data. The cache warming service begins reloading cached data after the data sources have been switched during a publishing deployment. See information about configuring repository item descriptors for caching in the Repository Guide. See information about configuring switching data sources in the Platform Installation and Configuration Guide.

You can configure the cache warming service to omit specific repositories from cache warming. To omit specific repositories from cache warming:

  1. Configure the excludeRepositoryList property of the /atg/epub/cachewarming/CacheWarmingServiceConfiguration component of your production server. The configuration file for this component is:

    <ATG11dir>/home/servers/production_server_name/localconfig/atg/epub/
    cachewarming/CacheWarmingServiceConfiguration.properties

  2. Include the component path of each repository in the value for excludeRepositoryList:

    excludeRepositoryList=/atg/userprofiling/PersonalizationRepository,\
                          /atg/multisite/SiteRepository

  3. Restart your application servers.

By default, the cache warming service will only load repository item properties from primary tables. If you want to load repository item properties from auxiliary or multi-type tables include those properties in the extraProperties configuration property. See information about SQL repository types in the Repository Guide.

To include repository item properties from auxiliary or multi-type tables when using cache warming:

  1. Configure the extraProperties property of the /atg/epub/cachewarming/CacheWarmingServiceConfiguration component of your production server. The configuration file for this component is:

    <ATG11dir>/home/servers/production_server_name/localconfig/atg/epub/
    cachewarming/CacheWarmingServiceConfiguration.properties

  2. Include the component path of the repository, a colon character, the item descriptor name, the equals character, and the property name in the value for extraProperties. Separate multiple repository paths with commas. Separate multiple property names with semicolons. See the following example:

    extraProperties=/atg/commerce/catalog/ProductCatalog:\
    catalog=rootCategories;rootCategoryIds, \
    /atg/commerce/pricing/priceLists/PriceLists:complexPrice=price;levels

  3. Restart your application servers.

Background Cache Warming

By default, the cache warming service launches cache warming in one or more separate Java threads. This allows cache warming to proceed at the same time that a production server is finishing deployment.

To configure the number of separate threads used for cache warming:

You can configure the cache warming service to run in the same thread used by the publishing deployment. If you do this, the deployment will be blocked until cache warming is complete. To configure the cache warming service to run in the same thread used by the publishing deployment:

Cache Warming Priority

You can configure the cache warming service to reload specific repositories and repository item descriptors first. After the cache warming service has loaded items from the repositories you choose, it loads items from the remaining repositories in random order. You can also configure the cache warming priority of specific repository item descriptors within the repositories that you choose to warm first.

To configure the cache warming service to warm specific repositories and repository item descriptors first:

Staggering Data Source Switching

You can configure your publishing server to wait a period of time between switching the data source for each production server in a cluster. This reduces the number of production servers that will begin cache warming at the same time. If you have a large number of production servers you may need to restrict the number that are loading data from the database into the cache at the same time.

Note: Staggering the data source switching in your production server cluster may cause data inconsistency. Simultaneous user sessions on different production servers may have inconsistent experiences.

To set the delay period between the data source switches for a publishing deployment:

Batching Cache Warming Transactions

You can control the number of repository items that the cache warming service will reload in each database transaction. Adjust the number of items in each transaction to suit the nature and size of the data stored in each item.

To configure the number of repository items loaded in each transaction:

Note: Typical settings for the maxBatchLoadingSize property are less than 200.

User Session Threshold

You can configure the cache warming service to stop reloading cached data if the number of active user sessions exceeds a specific level. Use this configuration to make sure that the cache warming service does not reduce application performance during peak periods of user activity. The user session threshold is the maximum number of user sessions allowed before the cache warming service will stop reloading cached data.

If the cache warming service stops because the user session threshold has been reached, it will not resume loading the cache. The cache warming service will attempt to reload the cache again during the next deployment. When the next deployment occurs, the production server deployment agent component will compile a new list of cached repository items and the cache warming service will reload only those items.

The user session threshold is not configured by default. Until you configure a user session threshold the cache warming service will not consider how many user sessions are active.

To configure the user session threshold:

Note: Setting this property to a negative number causes the cache warming service to reload repository items without considering how many user sessions are active.

Maximum Number of Repository Items Warmed

You can configure the cache warming service to stop reloading cached data when it reaches a maximum number of repository items. By default the cache warming service will reload an unlimited number of repository items.

To configure the maximum number of repository items that the cache warming service will reload for each deployment:

Note: Setting this property to a negative number causes the cache warming service to reload an unlimited number of repository items.


Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices