+

Search Tips   |   Advanced Search

Cache parameters

We use "cache" parameters in Web Content Manager tags and URLs to specify whether the retrieved data should be cached or not, and if so, how it should be cached. The "cache" parameter is not mandatory.

Custom caching parameters can only be used when a server's default Web content cache is set to none or advanced caching. If basic caching is used as the 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 being retrieved via the connect tag. When custom caching is used in a URL request, the caching applies to the entire page being requested.

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/connect/library/sitearea/content?cache=site&contentcache=session


Custom caching strategies


CacheKey parameter

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

Example:

The following URLs may 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.


Parent: Use custom caching