InfoCenter Home > 6.6.0.4.1.1: Description of the dynacache.xml fileThe servlet cache can be enabled or disabled by the presence of the dynacache.xml file. If the file is not present, the servlet engine functions in the usual manner. However, caching is enabled if the dynacache.xml file is present in directory: \WebSphere\AppServer\properties Use the dynacache.xml file to configure the size of the cache and to register external caches to be used by applications. 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 (document type definition) for the dynacache.xml file is specified in the dynacache.dtd file which ships with WebSphere Application Server and is located in directory: \WebSphere\AppServer\properties The dynacache.dtd file defines the root element, <cacheUnit>. The dynacache.dtd file is included in the xml file through a DOCTYPE declaration, as for example: <!DOCTYPE cacheUnit SYSTEM "dynacache.dtd"> Therefore, the beginning of the dynacache.xml file looks like: <?xml version="1.0"?> Configuring the global cache operationThe root <cacheUnit> element should contain one <cache> element that provides global settings for all Application Servers on a node. The format of the <cache> element is: <cache size="entries" priority="default_priority"/>In this example, the variables, entries and default_priority, are defined as:
<cache size="10000" priority="1"/> Controlling external cachesWebSphere Application Server can control external caches. You can define different external caches, each of which can have 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 adminstrator registers external cache groups with the <externalCacheGroups> element. You can also use the <externalCacheGroups> element in the servletcache.xml file. Each group is further defined with the <group> element. Group elements can contain <member> elements. The format of a <group> element is: <group id="group_name"> ... </group>The variable, group_name, is a string identifier for a group of external caches. For a servlet to be externally cacheable, a group_name must be used to identify the external group when the servlet is configured in the servletcache.xml file. The format of the <member> element is: <member address="address" adapterBeanName="adapter_class"/>The variable, address, is the hostname or IP address of the external cache location. The variable, adapter_class, is the package and class name of the adapter for the external cache. The adapter_class string is passed to the adapter bean's setAddress method. Check the adapter bean documentation for the format of the string. The format of an <externalCacheGroups> stanza is: <externalCacheGroups> <group id="edgeservers"> <member address="edgeone" adapterBeanName="my.package.EdgeAdapter"/> <member address="edgetwo" adapterBeanName="other.package.OtherAdapter"/> </group> </externalCacheGroups> |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|