Cache parameters

Use the cache parameters in HCL Web Content Manager tags and URLs to specify whether the retrieved data is cached or not. If it is cached, how it is cached. The cache parameter is not mandatory.

Custom caching parameters can be used only when a server's default web content cache is set to none or advanced caching. If basic caching is used as your default web content cache, custom caching cannot be used. Custom caching can be used to set cache parameters for basic, advanced, and data caches. When custom caching is used in a connect tag, the caching applies to the data that is being retrieved with the connect tag. When custom caching is used in a URL request, the caching applies to the entire page that is being requested.

Table 1. Values for the CACHE parameter
Basic caching Advanced Caching Data caching

CACHE=SITE
CACHE=SESSION
CACHE=NONE

CONTENTCACHE=SITE
CONTENTCACHE=SESSION
CONTENTCACHE=USER
CONTENTCACHE=SECURED
CONTENTCACHE=PERSONALIZED
CONTENTCACHE=NONE

CONNECTORCACHE=SITE
CONNECTORCACHE=SESSION
CONNECTORCACHE=NONE

Examples:
<CONNECT MOD=Web SRV=HTML ACTION=http://www.ibm.com CACHE=SITE >
http://host:port/wps/wcm/connect/library/sitearea/content?cache=site&contentcache=session

Custom caching strategies

  • When you apply custom caching to static content, you would mostly use CACHE=SITE, CACHE=SESSION or CONTENTCACHE=USER.
  • When User Groups are used in implementing site security, you can use the SECURED custom caching strategy: CONTENTCACHE=SECURED.
  • When Categories and/or Keywords, along with User Groups, are used for customization of your site, you can use the PERSONALIZED custom caching strategy: CONTENTCACHE=PERSONALIZED.
  • If your Server's default web Content Cache is set to Advanced, you must use CONTENTCACHE=NONE to disable caching.
  • If you retrieve external data, you must use CONNECTORCACHE=NONE to disable caching.

CacheKey parameter

The CacheKey parameter is used when caching content with the basic cache. A CacheKey is used as a key instead of a URL. This strategy is useful if you have multiple URLs for the same page but want it cached only once. This reduces the amount of memory that is used by the cache.

Example:

The following URLs use the same web page called news.html.

<CONNECT MOD=Web SRV=HTML ACTION=http://www.ibm.com/news.html 
CACHE=SITE CACHEKEY=news >

<CONNECT MOD=Web SRV=HTML ACTION=http://www.ibm.com.au/news.html 
CACHE=SITE CACHEKEY=news >

<CONNECT MOD=Web SRV=HTML ACTION=http://www.lotus.com/news.html 
CACHE=SITE CACHEKEY=news >

In this example, "news" is used as the CacheKey to store the value of the response from these connect tags. This means that news.html is cached only once instead of being cached three separate times.

Caching, content updates, and syndication

When an item is updated, either directly or as a result of syndication, no cache is updated. The rendered items are not updated until each configured cache is expired. It is important to choose cache timeout parameters that complement your syndication strategy.