MCPcopy Create free account
hub / github.com/cortexproject/cortex / Fetch

Method Fetch

pkg/chunk/cache/fifo_cache.go:181–194  ·  view source on GitHub ↗

Fetch implements Cache.

(ctx context.Context, keys []string)

Source from the content-addressed store, hash-verified

179
180// Fetch implements Cache.
181func (c *FifoCache) Fetch(ctx context.Context, keys []string) (found []string, bufs [][]byte, missing []string) {
182 found, missing, bufs = make([]string, 0, len(keys)), make([]string, 0, len(keys)), make([][]byte, 0, len(keys))
183 for _, key := range keys {
184 val, ok := c.Get(ctx, key)
185 if !ok {
186 missing = append(missing, key)
187 continue
188 }
189
190 found = append(found, key)
191 bufs = append(bufs, val)
192 }
193 return
194}
195
196// Store implements Cache.
197func (c *FifoCache) Store(ctx context.Context, keys []string, values [][]byte) {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.95

Tested by

no test coverage detected