MCPcopy
hub / github.com/golang/groupcache / lookupCache

Method lookupCache

groupcache.go:334–344  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

332}
333
334func (g *Group) lookupCache(key string) (value ByteView, ok bool) {
335 if g.cacheBytes <= 0 {
336 return
337 }
338 value, ok = g.mainCache.get(key)
339 if ok {
340 return
341 }
342 value, ok = g.hotCache.get(key)
343 return
344}
345
346func (g *Group) populateCache(key string, value ByteView, cache *cache) {
347 if g.cacheBytes <= 0 {

Callers 2

GetMethod · 0.95
loadMethod · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected