Set servlet caching


 

+

Search Tips   |   Advanced Search

 

After a servlet is invoked and completes generating the output to cache, a cache entry is created containing the output and the side effects of the servlet. These side effects can include calls to other servlets or JSPs or metadata about the entry, including timeout and entry priority information. Set servlet caching to save the output of servlets and JSPs to the dynamic cache.

To enable servlet caching, complete Use the dynamic cache service.

Unique entries are distinguished by an ID string that is generated from the HttpServletRequest object each time the servlet runs. We can then base servlet caching on:

Because JSPs files are compiled into servlets, the dynamic cache function treats JSPs files the same as servlets, except in specifically documented situations.

  1. In the admin console, click...

  2. Select Enable servlet caching under the Configuration tab.

  3. Click Apply or OK.
  4. Restart WAS.

 

Next steps

Define the cache policy for the servlets by Set cacheable objects with the cachespec.xml file.


Dynamic caching with Asynchronous Request Dispatcher