The following statistics are exposed by this MBean for each global cache:
- Cache group - the name of the cache group
- Cache – the name of the cache
- Layer – the name of the cache layer (memory, disk,...)
- Size – the number of items in the cache
- Hits - the number of requests to the cache that returned an item already loaded in the cache
- Misses - the number of requests to the cache that returned an item which had to be loaded in the cache
- Evictions - the number of times items that have been evicted from the cache
- Last access time - the timestamp of the last access to the cache
- Average get time(ns) - the average elapsed time, in nanoseconds, that takes for an item to be read from the cache. Note that some cache providers might only support millisecond resolution.
- Min get time(ns) - the minimum get time in nanoseconds
- Max get time(ns) - the maximum get time in nanoseconds
- Std deviation get time(ns) - the standard deviation for the get time
Multi-instance caches have three types of statistics. Some multi-instance caches offer also a statistics differentiator token which is used to differentiate further the cache instances for the purpose of calculating statistics. For transaction local caches this differentiator is the name of the business method currently being executed.
- Snapshot - these are statistics collected at the moment of the query from all caches alive at that moment
- Aggregated - these are statistics that are collected from all instances of caches that have been created. There are two types of aggregated statistics:
- Without differentiator - aggregated statistics where the differentiator token provided by the cache instance is not taken into consideration
- With differentiator - aggregated statistics where the differentiator token provided by the cache instance is taken into consideration