Dynamic cache monitor
The dynamic cache monitor is an installable Web application that displays simple cache statistics, cache entries, and cache policy information. Use this information to verify that the cache is behaving as expected. You can also use the browser-based interface of the cache monitor to manipulate data in the cache.
Use the dynamic cache monitor to perform these actions:
Verify the configuration of dynamic cache
To enable and configure the dynamic cache service, use the adminstrative console. Use the console to configure properties such as maximum size of the cache and disk offload location, as well as advanced features such as external caches. The cache monitor application provides a way for you to verify the configuration of the dynamic cache.Verify the cache policies
To cache an object, WAS must know how to generate unique IDs for different invocations of that object. The cachespec.xlm file specifies rules for each cacheable object. This file is located in the Web module WEB-INF or enterprise bean META-INF directory. The file can specify multiple cache ID rules for a cacheable object. In this case, the application server runs the rules in the specified sequence until a rule returns a cache ID or until it the last rule runs. If none of the cache ID generation rules produce a valid cache ID, the object is not cached. Because there can be multiple cachespec.xml files with multiple cache ID rules, cache monitor provides a convenient way to verify the policies of each object. It offers a view of all the cache polices currently loaded in dynamic cache. This view is also convenient to verify that the cachespec.xml file was read by the dynamic cache without errors.Monitor cache statistics
The cache monitor provides a view of the essential cache data, such as number of cache hits, cache misses, and number of entries in cache. Use this information to tune the cache configuration for optimal performance. For example, if the number of used entries is often high, and entries are being removed and recreated, you might want to increase the maximum size of the cache or enable disk offload.Monitor the data flowing through the cache
After a cacheable object is invoked, dynamic cache creates a cache entry for the object. The entry contains the output of the invokation and metadata, such as time to live, priority, and sharing policy. Entries are distinguished by a unique ID string that is based on the rules specified in the cachespec.xml file for the object's name. Objects with the same name may generate multiple cache IDs for different invocations, based on request parameters and attributes for each invocation. The cache monitor provides a view of all of the cache entries currently in cache, based on the unique ID. It also provides a view of the group of cache entries that share a common name. (This group is sometimes referred to as a template.) Cache entries can also be grouped together by a dependency ID, which is used to invalidate the entire group of entries dependent on a common entity.For each entry, cache monitor also displays metadata, such as time to live, priority, and sharing policy, and provides a view of the output that has been cached. Use this information to verify which pages are cached; that the cached pages have the correct attributes such as time to live, priority, and sharing policy; and that the pages have the correct content.
Monitor the data in the edge cache
The dynamic cache service provides support to recognize the presence of an Edge Side Include (ESI) processor and to generate ESI include tags and appropriate cache policies for edge cacheable fragments. The ESI processor has the ability to cache whole pages, as well as fragments. As a result, the ESI processor provides a higher cache hit ratio. Multiple ESI processors can run on multiple hosts that use dynamic caching. For information about edge cache statistics that you can view with the cache monitor, see Edge cache statistics.The dynamic cache monitor application provides a list of all ESI processes and their hosts that are enabled for caching. It also provides a way to select a host or a processor, and view its edge cache statistics as well as current cache entries.
View the data offloaded to the disk
By default, when the number of cache entries reaches the configured limit for a given server, existing cache entries are removed so that new entries to enter the cache service. The dynamic cache service includes the disk offload feature that copies the removed cache entries to a disk for future access. The dynamic cache monitor provides a view of the content offloaded to disk that corresponds to the view of contents cached in memory.Manage the data in the cache
You can also use the dynamic cache monitor application to perform these basic operations on the data in the cache:
- Remove an entry from the cache
- Remove all entries for a specified dependency ID
- Remove all entries for a specified name (template)
- Move an entry to the front of the least recent queue so that the entry is not removed
- Move an entry from the disk to the cache
- Clear the entire contents of the cache
- Clear the contents of the disk cache
Use these functions to manually change the state of the cache without restarting the server.