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

Method AddEntry

pkg/util/cache/cache.go:210–212  ·  view source on GitHub ↗

AddEntry adds a value to the cache. It provides an alternative interface to Add which the caller can use to reduce allocations by bundling the Entry structure with the key and value to be stored.

(entry *Entry)

Source from the content-addressed store, hash-verified

208// Add which the caller can use to reduce allocations by bundling the Entry
209// structure with the key and value to be stored.
210func (bc *baseCache) AddEntry(entry *Entry) {
211 bc.add(entry.Key, entry.Value, entry, nil)
212}
213
214// AddEntryAfter adds a value to the cache, making sure that it is placed after
215// the second entry in the eviction queue. It provides an alternative interface to

Callers

nothing calls this directly

Calls 1

addMethod · 0.95

Tested by

no test coverage detected