MCPcopy Index your code
hub / github.com/cortexproject/cortex / Cache

Interface Cache

pkg/chunk/cache/cache.go:20–24  ·  view source on GitHub ↗

Cache byte arrays by key. NB we intentionally do not return errors in this interface - caching is best effort by definition. We found that when these methods did return errors, the caller would just log them - so its easier for implementation to do that. Whatsmore, we found partially successful Fe

Source from the content-addressed store, hash-verified

18// Whatsmore, we found partially successful Fetches were often treated as failed
19// when they returned an error.
20type Cache interface {
21 Store(ctx context.Context, key []string, buf [][]byte)
22 Fetch(ctx context.Context, keys []string) (found []string, bufs [][]byte, missing []string)
23 Stop()
24}
25
26// Config for building Caches.
27type Config struct {

Callers 24

SetFlushOnShutdownMethod · 0.65
recordErrorMethod · 0.65
DoBatchFunction · 0.65
ShutdownMethod · 0.65
GetMemberlistKVMethod · 0.65
NewFrontendFunction · 0.65
TestFrontendCancelFunction · 0.65
FetchMethod · 0.65
convertUserMethod · 0.65

Implementers 6

FifoCachepkg/chunk/cache/fifo_cache.go
mockCachepkg/chunk/cache/mock.go
instrumentedCachepkg/chunk/cache/instrumented.go
Memcachedpkg/chunk/cache/memcached.go
snappyCachepkg/chunk/cache/snappy.go
RedisCachepkg/chunk/cache/redis_cache.go

Calls

no outgoing calls

Tested by

no test coverage detected