Configure high-speed external caching through the Web server

 

IBM HTTP Server for Windows NT and Windows 2000 operating systems contains a high-speed cache referred to as the Fast Response Cache Accelerator, or cache accelerator.

The Fast Response Cache Accelerator is available on Windows NT and Windows 2000 operating systems and AIX platforms. However, support to cache dynamic content is only available on Windows NT and Windows 2000 operating systems.

You can enable cache accelerator to cache static and dynamic content. To enable cache accelerator for caching static content, add the following directives to the http.conf configuration file, in the IBM HTTP Server conf directory...

To enable cache accelerator for caching dynamic content, such as servlets and Java Server Pages (JSP) files, configure the WAS and the IBM HTTP Server for distributed platforms...

  1. Configure WAS to enable Fast Response Cache Accelerator:

    1. Turn on servlet caching for each appserver that uses the cache accelerator.

    2. Configure an external cache group on the appserver...

      • Click Servers > Application Servers > server.

      • Click Dynamic Cache Service in the Additional Properties window.

      • Click External Cache Groups in the Additional Properties window.

      • Click New on the External cache group administrative console page to define an external cache group named afpa for each application server that uses the cache accelerator.

      • Type afpa in the External cache group field.

      • Click Apply.

      • Add a member to the group with an adapter bean name of com.ibm.ws.cache.servlet.Afpa...

      Click Afpa > External cache group members. Click New on the External cache group members administrative console page. Type com.ibm.ws.cache.servlet.Afpa in the AdapterBean name field. Enter an unused port number in the Address field.

    3. Add a cache policy in the cachespec.xml file for the servlet or JSP file you want to cache. Add the following property to the cache policy

      <property name="ExternalCache">afpa</property>
      

    It is important to follow all the steps for every appserver in the cluster.

  2. Enable cache accelerator on the IBM HTTP Server for distributed platforms...

    1. Add the following directives to the end of the httpd.conf file...

      • AfpaEnable

      • AfpaCache on

      • AfpaLogFile "$WAS_HOME\IBMHttpServer\logs\afpalog" V-ECLF

      • LoadModule afpaplugin_module $WAS_HOME/bin/afpaplugin.dll

      • AfpaPluginHost WAS_Hostname:port, where WAS_Hostname is the host name of the appserver and port is the port you specified in the Address field while configuring the external cache group member

    The LoadModule directive loads the IBM HTTP Server plug-in that connects the Fast Response Cache Accelerator to the WAS fragment cache.If multiple IBM HTTP Servers are routing requests to a single appserver, add the directives above to the http.conf file of each of these IBM HTTP Servers for distributed platforms.If one IBM HTTP Server is routing requests to a cluster of appservers, add the AfpaPluginHost WAS_Hostname:port directive to the http.conf file for each appserver in the cluster. For example, if there are three appservers in the cluster, add the following directives to the http.conf file...

    • LoadModule afpaplugin_module $WAS_HOME/bin/afpaplugin.dll

    • AfpaPluginHost WAS1_Hostname:port1

    • AfpaPluginHost WAS2_Hostname:port2

    • AfpaPluginHost WAS3_Hostname:port3

 

See Also

Enabling the dynamic cache service
Cachespec.xml file