Cache parameters
Use "cache" parameters in IBM Lotus Web Content Management 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 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 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=NONE
Examples:
<CONNECT MOD=Web SRV=HTML ACTION=http://www.ibm.com CACHE=SITE >
http://host:port/wps/wcm/connect/library/site/sitearea/content?cache=site&contentcache=sessionIn 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, 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, 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:
Use custom caching