MCPcopy Index your code
hub / github.com/golang/groupcache / get

Method get

groupcache.go:436–449  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

434}
435
436func (c *cache) get(key string) (value ByteView, ok bool) {
437 c.mu.Lock()
438 defer c.mu.Unlock()
439 c.nget++
440 if c.lru == nil {
441 return
442 }
443 vi, ok := c.lru.Get(key)
444 if !ok {
445 return
446 }
447 c.nhit++
448 return vi.(ByteView), true
449}
450
451func (c *cache) removeOldest() {
452 c.mu.Lock()

Callers 1

lookupCacheMethod · 0.80

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected