MCPcopy
hub / github.com/dgraph-io/dgraph / LocalCache

Interface LocalCache

tok/index/index.go:172–178  ·  view source on GitHub ↗

Local cache is an interface representation of the local cache of a persistent storage system

Source from the content-addressed store, hash-verified

170
171// Local cache is an interface representation of the local cache of a persistent storage system
172type LocalCache interface {
173 // Get uses a []byte key to return the Value corresponding to the key
174 Get(key []byte) (rval []byte, rerr error)
175 // GetWithLockHeld uses a []byte key to return the Value corresponding to the key with a mutex lock held
176 GetWithLockHeld(key []byte) (rval []byte, rerr error)
177 Find(prefix []byte, filter func(val []byte) bool) (uint64, error)
178}
179
180// CacheType is an interface representation of the cache of a persistent storage system
181type CacheType interface {

Callers

nothing calls this directly

Implementers 4

viLocalCacheposting/lists.go
viTxnposting/oracle.go
inMemTxntok/hnsw/test_helper.go
inMemLocalCachetok/hnsw/test_helper.go

Calls

no outgoing calls

Tested by

no test coverage detected