MCPcopy
hub / github.com/LyricTian/gin-admin / Cacher

Interface Cacher

pkg/jwtx/store.go:28–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28type Cacher interface {
29 Set(ctx context.Context, ns, key, value string, expiration ...time.Duration) error
30 Get(ctx context.Context, ns, key string) (string, bool, error)
31 Exists(ctx context.Context, ns, key string) (bool, error)
32 Delete(ctx context.Context, ns, key string) error
33 Close(ctx context.Context) error
34}
35
36func NewStoreWithCache(cache Cacher, opts ...StoreOption) Storer {
37 s := &storeImpl{

Callers 1

InitCacherFunction · 0.95

Implementers 3

badgerCachepkg/cachex/badger.go
redisCachepkg/cachex/redis.go
memCachepkg/cachex/cache.go

Calls

no outgoing calls

Tested by

no test coverage detected