Home


Portlet caching

Portlet caching is essentially the same as servlet caching. There are new request components available and some servlet request components are unavailable.

Note that there are interactions between enabling portlet and servlet caching such that if portlet caching gets enabled, servlet caching does, too.

Figure 6-1 Enabling portlet caching

If servlet caching is disabled, so is portlet caching.

Example 6-15 Portlet caching in cachespec.xml

<cache-entry>
  <class>portlet</class>
  <name>WorldClock</name> 
  <cache-id>
     <component id="*" type="parameter">
        <required>false</required>
     </component>
     <component id="currentTimeZone" type="portletSession">
        <required>false</required>
     </component>
     <timeout>180</timeout>
  </cache-id>
</cache-entry>

Table | -1 show a list of the available new portlet components (all servlet components are also valid for portlets unless specified).

Table 6-1 Portlet components for the cachespec.xml file

component description
portletSession Only applicable for portlets. Retrieves the portlet scoped (scoped by portletwindow) values from the HTTPSession.
timeout The value in portlet.xml overrides the one in cachespec.xml.
portletWindow New; uses the portlet window identifier as part of the cacheId.
portletMode, windowState New; represents the portlet mode or window state of the portlet.
sessionId New; applicable to portlets and servlet. Uses the session ID as cache property.
Not applicable Cannot be used for portlets: cookie, pathInfo, servletpath.

+

Search Tips   |   Advanced Search