From 5b04b1bb03c5cd992f06333128b276435a4aa1b3 Mon Sep 17 00:00:00 2001 From: Will Ezell Date: Fri, 13 Dec 2024 10:12:43 -0500 Subject: [PATCH] fix(cache) missed setting stat collection, adding back (#30935) #30670 The DynamicTTL does not call the stats collector when it instantiates the Caffeine Cache. This adds the stats collector to the DynamicTTL cache ![image](https://github.com/user-attachments/assets/832240c7-33b1-4af2-b4ba-e4ed9f3160bb) --- dotCMS/src/main/java/com/dotcms/cache/DynamicTTLCache.java | 1 + 1 file changed, 1 insertion(+) diff --git a/dotCMS/src/main/java/com/dotcms/cache/DynamicTTLCache.java b/dotCMS/src/main/java/com/dotcms/cache/DynamicTTLCache.java index a9c4f29ade68..3966996dc7b9 100644 --- a/dotCMS/src/main/java/com/dotcms/cache/DynamicTTLCache.java +++ b/dotCMS/src/main/java/com/dotcms/cache/DynamicTTLCache.java @@ -47,6 +47,7 @@ public long expireAfterRead(K key, CacheValue value, long currentTime, long curr return currentDuration; } }) + .recordStats() .maximumSize(maxCapacity) .build(); }