MCPcopy
hub / github.com/coocood/freecache / OverwriteCount

Method OverwriteCount

cache.go:405–410  ·  view source on GitHub ↗

OverwriteCount indicates the number of times entries have been overridden.

()

Source from the content-addressed store, hash-verified

403
404// OverwriteCount indicates the number of times entries have been overridden.
405func (cache *Cache) OverwriteCount() (overwriteCount int64) {
406 for i := range cache.segments {
407 overwriteCount += atomic.LoadInt64(&cache.segments[i].overwrites)
408 }
409 return
410}
411
412// TouchedCount indicates the number of times entries have had their expiration time extended.
413func (cache *Cache) TouchedCount() (touchedCount int64) {

Callers 3

TestOverwriteFunction · 0.95
TestLargeEntryFunction · 0.95
TestRaceFunction · 0.95

Calls

no outgoing calls

Tested by 3

TestOverwriteFunction · 0.76
TestLargeEntryFunction · 0.76
TestRaceFunction · 0.76