CacheStats
class CacheStats(val hits: Long, val misses: Long, val evictions: Long, val failedLoads: Long)(source)
A reading of a cache's four counts. Stable Core.
The four are read separately, not as one atomic snapshot. A cache that cannot count something reports zero.
Parameters
hits
calls answered without starting a load: a stored entry, or a load already in flight that the call joined.
misses
calls that started a load.
evictions
stored entries the size bound removed. This is narrower than the evictions of Caffeine, Guava and Micrometer: expiry and invalidation are not counted.
failedLoads
loads that ended in a failure or an Error, counted once per load, not once per waiter.
Throws
if a count is negative; the message names the property.
Properties
Functions
Link copied to clipboard
Two CacheStats are equal when their hits, misses, evictions and failedLoads are equal.