Specify caching timeout

If the display cache is enabled for the portal, and if a CacheTimeout configuration parameter is set for a particular Web clipping portlet, the Web clipping portlet will have its output cached for the time period of seconds specified by the value of CacheTimeout.

WebSphere Portal supports a feature called the display cache, which uses the IBM WAS dynamic cache feature to store portlet output for a specified time before it expires. Requests for that portlet during that time frame draw the content from the cache instead of from the portlet. Display caching is enabled on a portlet-by-portlet basis through an entry in the portlet.xml file. Display caching in the portal is enabled through WebSphere Portal's Web Container Service. You enable it by checking the "Enable Servlet Caching" box on the Servlet Caching tab of the Web Container Service dialog under the WebSphere Portal server definition in the WAS Administration Console.

Since each Web clipping portlet instance is a clone of a concrete portlet and since caching is typically enabled per concrete portlet instance, normally all Web clipping portlets would inherit the caching setting. This would not be acceptable if you want caching enabled for some, but not all, Web clipping portlets. To get around this, you can specify a CacheTimeout configuration parameter for a specific portlet. If the display cache is enabled for the portal, and if this value is set in a particular Web clipping portlet, the Web clipping portlet will have its output cached for the specified period of seconds.

So, if a Web clipping portlet is rendered on a page and another page is accessed before returning to this page, all within the specified timeout, portal will pull the Web clipping portlet's output from the display cache instead of invoking the Web clipping portlet again. If the timeout expires or if a link on the Web clipping portlet is selected, then the Web clipping portlet is re-invoked.

To specify a caching timeout value, go to Administration > Portlet Management > Portlets. Click the Configure portlet icon for the Web Clipping portlet and enter the following information in the New parameter/New value text boxes and then click the Add button:

CacheTimeout = ##

Where ## is some number of seconds. This parameter has no effect if the display cache is not enabled for the portal. By default, cached contents for Web clipping portlets are shared across all Web clipping portlets. If more than one portlet navigates different content from the same URL, then one can return the content that was cached by another. If this is the case, the clipped content is duplicated across the portlets. To prevent this problem, qualify that the cache entry is portlet instance-specific by adding the following configuration parameter:

CacheKeys = portlet

Optionally, you can also qualify that the cache entries should be specific to each user by adding the following configuration parameter:

CacheKeys = portlet,user


Parent

Use Web clipping to import content

 


+

Search Tips   |   Advanced Search