Configuring Caching Proxy for dynamic caching

To enable the proxy server to cache dynamically generated content (results from servlets and JSPs), you must make two changes in the proxy configuration file, ibmproxy.conf. The first change enables the dynamic caching plug-in module, and the second change configures it to recognize the sources of cacheable dynamic content.

Set the Service directive to enable the dynamic caching plug-in

An API directive for the Service step is used to enable the dynamic caching plug-in. To create this directive, either manually edit the ibmproxy.conf file, or if the proxy server is already running, use the Configuration and Administration forms to select Server Configuration -> Request Processing -> API Request Processing. The content of the directive is shown in examples that appear later in this section.

A prototype Service directive for enabling dynamic caching exists as a comment in the API section of the ibmproxy.conf file. It has the heading JSP Plug-in. Note that the prototype API directives are in a purposeful order. When adding API directives to enable new features and plug-in modules, order the directives as shown in the prototype section of the configuration file. Optionally, you can remove the comment characters from the prototype API directives and edit them as necessary to include support for each desired function or plug-in.

Set the Service directive as shown in the following examples. (Note that each directive must appear on a single line in the proxy configuration file; these examples sometimes contain line breaks for readability.)

If Caching Proxy software is installed in a directory other than the default, substitute your installation path for the path in these examples.

Set the ExternalCacheManager directive to specify file sources

Each Caching Proxy must also be configured to recognize the source of the dynamically generated files. Add an ExternalCacheManager directive to the ibmproxy.conf file for each application server that caches dynamically generated content at this proxy server. This directive specifies a WebSphere® Application Server that caches results at the proxy, and sets a maximum expiration time for content from that server. More details appear in ExternalCacheManager -- Configure the Caching Proxy for dynamic caching from IBM WebSphere Application Server.

The server ID used in the ExternalCacheManager directive must match the group ID used in the external cache group stanza of the application server's dynacache.xml file.

For the previous example, add the following entry to each proxy's ibmproxy.conf file.

ExternalCacheManager   IBM-edge-cp-XYZ-1  20 seconds

The Caching Proxy caches only contents from a IBM® WebSphere Application Server whose group ID matches an ExternalCacheManager entry in the ibmproxy.conf file.