MCPcopy Create free account
hub / github.com/dgraph-io/dgraph-benchmarks / Get

Method Get

cachebench/cache_bench_test.go:144–151  ·  view source on GitHub ↗
(key []byte)

Source from the content-addressed store, hash-verified

142}
143
144func (b *FastCache) Get(key []byte) ([]byte, error) {
145 v := b.c.Get(nil, key)
146 if v == nil || len(v) == 0 {
147 return nil, errKeyNotFound
148 }
149
150 return v, nil
151}
152
153func (b *FastCache) Set(key, value []byte) error {
154 b.c.Set(key, value)

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected