MCPcopy
hub / github.com/silenceper/wechat / SetContext

Function SetContext

cache/cache.go:34–39  ·  view source on GitHub ↗

SetContext set value to cache

(ctx context.Context, cache Cache, key string, val interface{}, timeout time.Duration)

Source from the content-addressed store, hash-verified

32
33// SetContext set value to cache
34func SetContext(ctx context.Context, cache Cache, key string, val interface{}, timeout time.Duration) error {
35 if cache, ok := cache.(ContextCache); ok {
36 return cache.SetContext(ctx, key, val, timeout)
37 }
38 return cache.Set(key, val, timeout)
39}
40
41// IsExistContext check value exists in cache.
42func IsExistContext(ctx context.Context, cache Cache, key string) bool {

Callers 2

Calls 2

SetContextMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…