Caching dynamically generated content

This applies to reverse proxy configurations only.

The dynamic caching function enables Caching Proxy to cache dynamically generated content in the form of responses from JavaServer Pages (JSP) and servlets generated by a IBM® WebSphere® Application Server. A Caching Proxy adapter module is used at the application server to modify the responses so that they can be cached at the proxy server in addition to being cached in the application server's dynamic cache. With this feature, dynamically generated content can be cached on the edge of the network, freeing the content host from making repeated requests to the application server when more than one client requests the same content.

Note:
The dynamic caching feature does not enable the proxy server to cache results from URL queries. To cache query results, configure caching filters, which are described in Controlling what is cached and in the directives reference documentation on CacheQueries -- Specify cache responses to URLs containing a question mark (?). Query results from origin servers that are not IBM WebSphere Application Servers can be cached.

It is sometimes necessary to enable query caching in order for the dynamic caching feature to work, for example, if your servlets use URLs in the form of queries. The proxy server considers any URL that contains a question mark (?) to be a query.

The caching of dynamically generated content offers the following benefits:

The application server exports only fully composed public pages for proxy caching. Private pages are not cached by the proxy. For example, a dynamically generated page from a public site that lists the current weather forecast can be exported by the IBM WebSphere Application Server and cached by Caching Proxy. However, a dynamically generated page that lists the contents of a user's shopping cart cannot be cached by the proxy server. Also, in order for a dynamically generated page to be cached, all subcomponents of that page also must be cacheable.

Cached dynamic files do not expire in the same way that regular files do; they can be invalidated by the application server that generated them.

Entries in the dynamic cache are invalidated in the following circumstances:

Invalidation of dynamic cache entries is done by generating an Invalidate message for the specific instance of the Caching Proxy dynamic caching plug-in. Caching Proxy receives Invalidate messages as posts to the /WES_External_Adapter resource locator. Caching Proxy then clears the invalid entries from its cache.

Dynamic caching requires the following configuration steps.