MCPcopy Create free account
hub / github.com/golang/groupcache / CacheStats

Method CacheStats

groupcache.go:386–395  ·  view source on GitHub ↗

CacheStats returns stats about the provided cache within the group.

(which CacheType)

Source from the content-addressed store, hash-verified

384
385// CacheStats returns stats about the provided cache within the group.
386func (g *Group) CacheStats(which CacheType) CacheStats {
387 switch which {
388 case MainCache:
389 return g.mainCache.stats()
390 case HotCache:
391 return g.hotCache.stats()
392 default:
393 return CacheStats{}
394 }
395}
396
397// cache is a wrapper around an *lru.Cache that adds synchronization,
398// makes values always be ByteView, and counts the size of all keys and

Callers

nothing calls this directly

Calls 1

statsMethod · 0.80

Tested by

no test coverage detected