InfoCenter Home > 6.6.0.16.1: Global administrationYou can enable and configure dynamic fragment caching through a XML configuration file or through the administrative console. XML configuration fileThe dynacache.xml file enables and configures dynamic fragment (also known as servlet) caching. If this file is not found in the product_installation\properties directory, the Web container processes servlets in the usual manner. However, if this file is found in the product_installation\properties directory, then dynamic fragment caching is enabled. Within this file, users configure the overall operation of the cache, such as its size, and register the external caches that are used by the application. Note: The dynacache.xml file is read only once, at WebSphere Application Server startup. So if changes are made to the file, WebSphere Application Server must be restarted for the changes to take effect.
The DTD for the dynacache.xml file is specified in the dynacache.dtd file, which ships with WebSphere Application Server and is located in the product_installation\properties directory. The dyncache.dtd file defines the root element, <cacheUnit>, and should be included in the dynacache.xml file through the DOCTYPE declaration. The beginning of the dynacache.xml should have the following processing instructions: <?xml version="1.0"?> <!DOCTYPE cacheUnit SYSTEM "dynacache.dtd"> Console configurationYou can also enable dynamic fragment caching through the administrative console. Cache properties are located under a server's Web Container:
Description of elements in the dynacache.xml fileThe elements defined in the dynacache.xml file provide the following two categories of function:
Configuring global cache operationsThe root <cacheUnit> element contains one <cache> element, which provides global settings for all Application Servers on a node.
Controlling external cachesWebSphere Application Server can control external caches. You can define different groups of external caches, each with its own set of member caches. The interface between WebSphere Application Server and one of the member caches is an adapter bean, typically written by the vendor of the external cache. An administrator registers external cache groups within an <externalCacheGroups> element, which can then be used in cache policies. Each group is defined within a <group> element, which can contain <member> elements. See the External cache adapter building article for information on configuring WebSphere Application Server to control IBM Edge Server or IBM HTTP Server.
Example of the dynacache.xml fileAn entire dynacache.xml file based on the element definitions previously described might look like the following example: <?xml version="1.0"?>
Quick Reference of the dynacache.xml file
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|