Codebase list golang-github-renekroon-ttlcache / 690c3026-a8ce-4646-a3d1-a2f1a0aae4ed/main metrics.go
690c3026-a8ce-4646-a3d1-a2f1a0aae4ed/main

Tree @690c3026-a8ce-4646-a3d1-a2f1a0aae4ed/main (Download .tar.gz)

metrics.go @690c3026-a8ce-4646-a3d1-a2f1a0aae4ed/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
}