Cache parameters

 

+

Search Tips   |   Advanced Search

 

Use "cache" parameters in IWWCM 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.

The values for the CACHE parameter are:

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

Example:

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

In this example, the page http://www.ibm.com will be rendered and stored in the Basic Site Cache. Future requests of the same page will receive the cached page unless the page is flushed by the relevant cache strategies or unless the cached data expires. If so, it will be retrieved from the original server again.

 

Custom caching strategies

  • When applying 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, we can use the SECURED custom caching strategy: CONTENTCACHE=SECURED.

  • When Categories and/or Keywords, along with User Groups, are used for customization of the site, we can use the PERSONALIZED custom caching strategy: CONTENTCACHE=PERSONALIZED.

  • If the Server's default Web Content Cache is set to Advanced, use CONTENTCACHE=NONE to disable caching.

  • If retrieving external data use CONNECTORCACHE=NONE to disable caching.

 

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 the above 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 Topic

Using custom caching