MCPcopy
hub / github.com/usememos/memos / SetWithTTL

Method SetWithTTL

store/cache/cache.go:16–16  ·  view source on GitHub ↗

SetWithTTL adds a value to the cache with a custom TTL.

(ctx context.Context, key string, value any, ttl time.Duration)

Source from the content-addressed store, hash-verified

14
15 // SetWithTTL adds a value to the cache with a custom TTL.
16 SetWithTTL(ctx context.Context, key string, value any, ttl time.Duration)
17
18 // Get retrieves a value from the cache.
19 Get(ctx context.Context, key string) (any, bool)

Callers 1

TestCacheBasicOperationsFunction · 0.65

Implementers 1

Cachestore/cache/cache.go

Calls

no outgoing calls

Tested by 1

TestCacheBasicOperationsFunction · 0.52