Dynamic Cache Policy Editor for WebSphere Application Server
A tool for generating, creating, and editing cache policies for the dynamic cache service of WebSphere Application Server.
Date Posted: March 25, 2004
|
|
 |
 |
 |
 |
|
 |  The dynamic cache is an application service that comes with WebSphere Application Server. This service improves the performance of Java 2 Enterprise Edition (J2EE) applications by caching the results of requests for servlets, Web Services, Java Server Pages (JSPs), and WebSphere Commands. By holding these results in the cache, the application server need not repeatedly perform the same computations and back-end queries.
The cachespec.xml file allows the administrator to develop the rules that the dynamic cache follows. These rules specify when to delete cached data, when to cache a request, and when to serve a cached item. The rules vary depending on the specific application. For example, a stock quote database is updated periodically, so the administrator specifies a rule for keeping the quote in the cache for a certain length of time. However, it is possible for the data to be changing so often that using the cache would merely fill it up with outdated data. It is up to the administrator and application developer to determine the rules that will result in the best application server performance. For more information on dynamic cache, please visit the WebSphere Application Server InfoCenter.
| | |
 |  WebSphere Application Server is application server software that can be used to deploy, integrate, run, and manage J2EE e-business applications. For more information on WebSphere Application Server, please visit this Web site.
| | |
 |  A cache policy contains rules that define the behavior of the cache, including when to cache a request, when to serve a cached request, and when to remove a stored item from the cache.
The cache policies are defined in a cachespec.xml file. The cachespec.xml file follows the cachespec.dtd, which defines the properties and elements that can be used to create the policies. Each cache entry element in the cachespec.xml file defines a cache policy for an object in the application. For example:
<cache-entry>
<class>servlet</class>
<name>/ShoppingCart</name>
<component id="getUser" type="parameter">
</component>
<timeout>180</timeout>
</cache-id>
</cache-entry>
This cache policy is defined for a servlet named ShoppingCart. It contains a rule for creating a cache ID based on a request parameter "getUser" and a time-out value of 180 seconds.
When the user makes a request for the ShoppingCart servlet, the caching service creates an ID based on the rules in the cache policy and searches for the generated cache ID in the cache. If the entry is found, the user receives the cached data for his ShoppingCart. Otherwise, the response is processed with computations or accesses to the backend, returned to the user, and cached for 180 seconds as defined in the time-out value in the cache policy.
Each cache policy can have multiple cache ID rules and each cache ID rule can have multiple components. For example:
<cache-entry>
<class>servlet</class>
<name>/ShoppingCart</name>
<component id="getUser" type="parameter">
</component>
<component id="getViewingPreference" type="parameter">
</component>
<timeout>180</timeout>
</cache-id>
<cache-id>
<component id="getUser" type="parameter">
</component>
<timeout>180</timeout>
</cache-id>
</cache-entry>
A cache ID rule results in a valid cache ID if all required components exist in the given request. For each request, the cache ID rules are used in order until a rule results in a non-empty cache ID or no rules remain to be executed. If a cache ID is not obtained for a given request, it is treated as non-cacheable.
The cachespec.xml file can also include rules for deleting cached data depending on factors such as session expiry or a change in backend data. For more information on cache policies, please visit the WebSphere Application Server InfoCenter. | | |
 |  No. The Dynamic Cache Policy Editor supports only cache policies for WAS 5.1.0, Service Pack 3 and above.
| | |
 |  Yes. The cache policy editor can be used with existing cache policy files created for WebSphere Application Server (WAS) 5.1.0, Service Pack 3 and above. When a previously created file is opened for the first time in the Dynamic Cache Policy Editor, the file is validated against the cachespec.dtd. If the file does not follow the cachespec.dtd, the editor reports any errors.
Note: The editor also adds certain tags for its GUI pages that are not used by the Application Server. Please ignore warnings thrown by the dynamic cache service when using files with these additional tags.
| | |
 |  No. This tool is provided as an Eclipse plug-in, but it requires additional plug-ins that are not included in the open-source Eclipse. These additional plug-ins are available in the IBM WebSphere Studio Application Developer (WSAD) 5.1.0 and WebSphere Application Server Toolkit (ASTK) 5.1.0. The plug-ins of this tool must therefore be installed from within either one of these two products.
| | |
 |  The WebSphere Application Server Toolkit is development software that is included on a separately-installable CD that comes with WebSphere Application Server. It is made up of five components: the Eclipse workbench, Assembly Toolkit, Debug component, Distributed Profiling component, and Logging tools.
| | |
 |  IBM WebSphere Studio Application Developer (WSAD) is the core IBM development environment for creating and maintaining Web services and Java 2 Enterprise Edition (J2EE) applications.
| |
|
|
 |
|
| |