Dynamic response caching

Dynamic response caching decreases a servlet’s or JSP’s response times by caching the output with a multi-part, user-configured key value. This caching mechanism stores responses in their entirety. For pages that return both volatile content and content that rarely changes, use partial response caching instead.

When response caching is enabled for a servlet or JSP, EAServer checks the cache before invoking the Web component, looking for an entry that matches the key that you have defined for the servlet or JSP. If an appropriate response is found in the cache, EAServer returns the contents of the cache, instead of calling the servlet. If the cache contains no matching key, EAServer invokes the servlet, and caches the response and response headers while returning them to the client.

You can define the key that EAServer uses to store and retrieve cached entries. By default, a key consists of only the servlet’s or JSP’s location on disk. You can further refine key values by adding up to five optional parameters. Doing so allows caching of separate responses from the same servlet or JSP, based on request characteristics such as locale or HTTP session ID. In addition, you can configure a timeout for cache entries associated with the JSP or servlet to prevent the use of stale data.