Cache monitor
Cache monitor is an installable web application (.war) that provides a real-time view of the current state of dynamic cache.
Cache monitor provides a way to...
- Verify the configuration of dynamic cache
The WAS adminstrative console provides ways to enable the dynamic cache service and configure properties, such as maximum size of the cache and disk offload location, as well as advanced features such as controlling external caches. Cache monitor offers a way for dynamic cache users to verify the configuration of the dynamic cache by providing a convenient view of the configured features and properties in the cache monitor.
- Verify the cache policies
To cache an object, WebSphere Application Server must know how to generate unique IDs for different invocations of that object. This is performed by providing rules for each cacheable object in the cachespec.xml file, found inside the Web module WEB-INF or enterprise bean META-INF directory. Each cacheable object can have multiple cache ID rules that execute in sequence until either a rule returns a cache ID or no more rules remain to execute. If none of the cache ID generation rules produce a valid cache ID, then the object is not cached. Since 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
Cache monitor provides a view of the essential cache data, such as number of cache hits, cache misses, and number of entries in cache. This helps to tune the cache configuration optimally to get the best performance improvement out of dynamic cache. For example, if the number of used entries is often high, and entries are being removed and recreated, one might consider increasing the maximum size of the cache or enabling disk offload.
- Monitor the data flowing through the cache
Once a cacheable object is invoked, dynamic cache creates a cache entry for it that contains the output of the execution and metadata, such as time to live, sharing policy, etc. Entries are distinguished by a unique ID string that is based on the rules specified in the cachespec.xml file for this objects name. Objects with the same name may generate multiple cache IDs for different invocations, based on request parameters and attributes for each invocation. Cache monitor provides a view of all 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 (also known as 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. Therefore, cache monitor also provides a view of the group of cache entries that share a common dependency ID.
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. This helps the customer to verify which pages have been cached, that the pages have been cached with the right attributes such as time to live, priority, etc., and that the pages have the right content.
- Monitor the data in the edge cache
Dynamic cache 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, providing a higher cache hit ratio. There can be multiple ESI processors running on multiple hosts configured for caching.
Cache monitor 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, eviction of cache entries occurs, allowing new entries to enter the cache service. The dynamic cache includes the disk offload feature that copies the evicted cache entries to disk for future access. Cache monitor offers a view of the content offloaded to disk that corresponds to the view of contents cached in memory.
- Manage the data in the cache
Besides displaying cache content, cache monitor also provides some basic operations on the data in the cache...
- Removing an entry from the cache
- Removing all entries for a certain dependency ID
- Removing all entries for a certain name (template)
- Moving an entry to the front of the least recently used queue to avoid eviction
- Moving an entry from the disk to the cache
- Clearing the entire contents of the cache
- Clearing the contents of the disk cache
These functions are useful for dynamic cache customers, as they provide a way to manually change the state of the cache without having to restart the server.
See Also
Displaying cache information
Edge cache statistics