MCPcopy
hub / github.com/grafana/dskit / Set

Method Set

cache/mock.go:48–53  ·  view source on GitHub ↗
(_ context.Context, key string, value []byte, ttl time.Duration)

Source from the content-addressed store, hash-verified

46}
47
48func (m *MockCache) Set(_ context.Context, key string, value []byte, ttl time.Duration) error {
49 m.mu.Lock()
50 defer m.mu.Unlock()
51 m.cache[key] = Item{Data: value, ExpiresAt: m.now.Add(ttl)}
52 return nil
53}
54
55func (m *MockCache) Add(_ context.Context, key string, value []byte, ttl time.Duration) error {
56 m.mu.Lock()

Callers

nothing calls this directly

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected