chore: Adding cache logs for debugging (#17029)
This commit is contained in:
parent
28a3fc6625
commit
936ef75841
|
|
@ -72,6 +72,7 @@ public class RedisCacheManagerImpl implements CacheManager {
|
|||
.switchIfEmpty(Mono.defer(() -> {
|
||||
//This is a cache miss, update stats and return empty
|
||||
statsMap.get(cacheName).getMisses().incrementAndGet();
|
||||
log.debug("Cache miss for key {}", path);
|
||||
return Mono.empty();
|
||||
}));
|
||||
}
|
||||
|
|
@ -80,6 +81,7 @@ public class RedisCacheManagerImpl implements CacheManager {
|
|||
public Mono<Boolean> put(String cacheName, String key, Object value) {
|
||||
ensureStats(cacheName);
|
||||
String path = cacheName + ":" + key;
|
||||
log.debug("Cache entry added for key {}", path);
|
||||
return reactiveRedisTemplate.opsForValue().set(path, value);
|
||||
}
|
||||
|
||||
|
|
@ -88,6 +90,7 @@ public class RedisCacheManagerImpl implements CacheManager {
|
|||
ensureStats(cacheName);
|
||||
statsMap.get(cacheName).getSingleEvictions().incrementAndGet();
|
||||
String path = cacheName + ":" + key;
|
||||
log.debug("Cache entry evicted for key {}", path);
|
||||
return reactiveRedisTemplate.delete(path).then();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user