Details
-
Sub-task
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
To get a better picture around the usage of cache it would be helpful to enable the statistics for various caches used in Oak
nodeCache = CacheBuilder.newBuilder() .weigher(...) .maximumWeight(...) .recordStats() .build();
Once enabled it allows to get stats like below
CacheStats{hitCount=763322, missCount=51333, loadSuccessCount=0, loadExceptionCount=0, totalLoadTime=0, evictionCount=3496}
As stats collection adds a very minor overhead we can look into making this setting configurable.
Untill we expose the stats via JMX one can extract the value in Sling env via approach mentioned in this gist