O'Reilly logo

IBM Rational Application Developer V6 Portlet Application Development and Portal Tools by Ryan Wilson, Gianfranco Rutigliano, George Kroner, Belen Gonzalez, Karla Galvan, Cristiano Cesario, Juan R. Rodriguez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.7. Portlet caching

Caching improves performance by reducing the load on the server. Caching is per user per portlet, a portlet cached for one user will not be used for another user. A JSR 168 portlet must use the portlet.xml to enable caching.

Example 8-19. Portlet caching in the portlet.xml
<portlet>
   ...
      <expiration-cache>600</expiration-cache>
   ...
</portlet>

The expiration cache is defined in seconds. In the example above, the contents of the portlet should be cached for 10 minutes. A value of zero indicates that the portlet caching is disabled. A -1 value will cause the portlet cache to never expire. Any value above 0 will be interpreted as the number of seconds the content should be cached for.

If the expiration-cache is defined in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required