Files
spring-data-redis/src/main/java/org/springframework
Mark Paluch 6daeb1a04c DATAREDIS-1082 - Expose cache metrics for RedisCache.
We now expose CacheStatistics for RedisCache. Each cache tracks its statistics (retrievals, hits, misses, stores, removals, lock wait) locally. CacheStatistics is exposed through RedisCacheWriter to allow for statistics customization depending on the cache writer strategy. The statistic object is a singleton per cache instance that gets updated with as the cache operates.

RedisCache cache = …;
CacheStatistics statistics = cache.getStatistics();
statistics.getRetrievals();
statistics.getHits();

Original Pull Request: #545
2020-07-13 08:50:12 +02:00
..