+

Search Tips   |   Advanced Search

Configure portlet fragment caching

After a portlet is invoked and completes generating the output to cache, a cache entry is created, containing the output and the side effects of the portlet. These side effects can include calls to other portlets or metadata about the entry, including timeout and entry priority information. Configure portlet fragment caching with the WebSphere Application Server administrative console to save the output of portlets to the dynamic cache.

To enable portlet fragment caching, complete the steps in the Using the dynamic cache service topic.

Unique entries are distinguished by an ID string that generates from the PortletRequest object each time the portlet runs. We can then base portlet fragment caching on:


Tasks

  1. In the administrative console, click...

            Servers > Server Types > WebSphere application servers > server > Portlet container settings > Portlet container > Application servers > server tree.

  2. Select Enable portlet fragment cache under the Configuration tab.

  3. Click Apply or OK.

  4. Restart WAS.

    Refer to the Managing application servers topic for more information about managing the application servers.


What to do next

Define a cache policy for our portlets. Note that portlets are not cached unless an applicable caching policy is defined in a cachespec.xml file. Refer to the Configuring cacheable objects with the cachespec.xml file topic for general task information about defining a cache policy. Refer to the Configuring caching policies for portlets topic for information about defining portlet-specific aspects in a cache policy.


Subtopics


Related:

  • Portlets
  • Configure portlet fragment caching with the wsadmin tool
  • Use the dynamic cache service
  • Manage application servers
  • Configure cacheable objects with the cachespec.xml file
  • Portlet container settings