Record stats for all caches

This is disabled by default in Guava, but we report in show-caches
average loading time. To ensure it isn't always 0, record stats.

Change-Id: I9861b0b20463c8893933d41788139a4c374caaab
This commit is contained in:
Shawn O. Pearce
2012-05-25 09:03:51 -07:00
parent 2e2d135529
commit 0b549fb3e2

View File

@@ -68,6 +68,7 @@ public class DefaultCacheFactory implements MemoryCacheFactory {
CacheBinding<K, V> def,
boolean unwrapValueHolder) {
CacheBuilder<K,V> builder = newCacheBuilder();
builder.recordStats();
builder.maximumWeight(cfg.getLong(
"cache", def.name(), "memoryLimit",
def.maximumWeight()));