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=NONECONTENTCACHE=SITE
CONTENTCACHE=SESSION
CONTENTCACHE=USER
CONTENTCACHE=SECURED
CONTENTCACHE=PERSONALIZED
CONTENTCACHE=NONECONNECTORCACHE=SITE
CONNECTORCACHE=SESSION
CONNECTORCACHE=NONEExamples:
<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
- 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 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