MCPcopy Create free account
hub / github.com/go-dev-frame/sponge / Set

Method Set

pkg/cache/cache.go:28–28  ·  view source on GitHub ↗
(ctx context.Context, key string, val interface{}, expiration time.Duration)

Source from the content-addressed store, hash-verified

26// Cache driver interface
27type Cache interface {
28 Set(ctx context.Context, key string, val interface{}, expiration time.Duration) error
29 Get(ctx context.Context, key string, val interface{}) error
30 MultiSet(ctx context.Context, valMap map[string]interface{}, expiration time.Duration) error
31 MultiGet(ctx context.Context, keys []string, valueMap interface{}) error

Callers 15

SetMethod · 0.65
SetCacheWithNotFoundMethod · 0.65
SetMethod · 0.65
SetCacheWithNotFoundMethod · 0.65
SetFunction · 0.65
TestMemoryCacheFunction · 0.65
TestMemoryCacheErrorFunction · 0.65
BenchmarkGetFromMemoryFunction · 0.65
TestRedisCacheFunction · 0.65
TestRedisCacheErrorFunction · 0.65
TestRedisClusterCacheFunction · 0.65

Implementers 3

redisCachepkg/cache/redis.go
redisClusterCachepkg/cache/redis.go
memoryCachepkg/cache/memory.go

Calls

no outgoing calls

Tested by 15

TestMemoryCacheFunction · 0.52
TestMemoryCacheErrorFunction · 0.52
BenchmarkGetFromMemoryFunction · 0.52
TestRedisCacheFunction · 0.52
TestRedisCacheErrorFunction · 0.52
TestRedisClusterCacheFunction · 0.52
TestCorsWithCustomConfigFunction · 0.52
TestCorsWithAllowOriginsFunction · 0.52
TestCorsPreflightRequestFunction · 0.52