MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / Get

Method Get

pkg/util/cache/cache.go:249–255  ·  view source on GitHub ↗

Get looks up a key's value from the cache.

(key interface{})

Source from the content-addressed store, hash-verified

247
248// Get looks up a key's value from the cache.
249func (bc *baseCache) Get(key interface{}) (value interface{}, ok bool) {
250 if e := bc.store.get(key); e != nil {
251 bc.access(e)
252 return e.Value, true
253 }
254 return nil, false
255}
256
257// StealthyGet looks up a key's value from the cache but does not consider it an
258// "access" (with respect to the policy).

Callers

nothing calls this directly

Calls 2

accessMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected