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

Method Add

cache/cache.go:52–52  ·  cache/cache.go::Cache.Add

Add stores a key and value into a cache only if it does not already exist. If the item was not stored because an entry already exists in the cache, ErrNotStored will be returned.

(ctx context.Context, key string, value []byte, ttl time.Duration)

Source from the content-addressed store, hash-verified

50 // item was not stored because an entry already exists in the cache, ErrNotStored will
51 // be returned.
52 Add(ctx context.Context, key string, value []byte, ttl time.Duration) error
53
54 // Delete deletes a key from a cache.
55 Delete(ctx context.Context, key string) error

Callers 15

newAsyncQueueFunction · 0.65
AddMethod · 0.65
TestMemcachedClient_AddFunction · 0.65
SetAsyncMethod · 0.65
SetMultiAsyncMethod · 0.65
SetMethod · 0.65
AddMethod · 0.65
GetMultiWithErrorMethod · 0.65
SetAsyncMethod · 0.65
SetMultiAsyncMethod · 0.65
SetMethod · 0.65
AddMethod · 0.65

Implementers 7

Versionedcache/versioned.go
MemcachedClientcache/memcached_client.go
LRUCachecache/lru.go
MockCachecache/mock.go
SpanlessTracingCachecache/tracing.go
SnappyCachecache/compression.go

Calls

no outgoing calls