Codebase list golang-github-renekroon-ttlcache / 6d3d4eae-0ce5-4a0c-b3eb-74e2c83f426b/main metrics.go

Tree @6d3d4eae-0ce5-4a0c-b3eb-74e2c83f426b/main (Download .tar.gz)

metrics.go @6d3d4eae-0ce5-4a0c-b3eb-74e2c83f426b/mainraw · history · blame

package ttlcache

// Metrics contains common cache metrics so you can calculate hit and miss rates
type Metrics struct {
	// succesful inserts
	Inserted int64
	// retrieval attempts
	Retrievals int64
	// all get calls that were in the cache (excludes loader invocations)
	Hits int64
	// entries not in cache (includes loader invocations)
	Misses int64
	// items removed from the cache in any way
	Evicted int64