Add debug log that shows up in trace whenever CacheLoader#load is invoked

This allows us to see cache misses in the trace.

Change-Id: I7ed1c779c35e6621cabaa6f257289913c92e1fe9
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2018-08-14 10:16:31 +02:00
parent ab47dc9238
commit 944cd404ac
9 changed files with 18 additions and 0 deletions

View File

@@ -235,6 +235,8 @@ public class H2CacheImpl<K, V> extends AbstractLoadingCache<K, V> implements Per
@Override
public ValueHolder<V> load(K key) throws Exception {
logger.atFine().log("Loading value for %s from cache", key);
if (store.mightContain(key)) {
ValueHolder<V> h = store.getIfPresent(key);
if (h != null) {