mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
update
This commit is contained in:
14
cache/distributed_cache.go
vendored
Normal file
14
cache/distributed_cache.go
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
package cache
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
// 分布式缓存接口
|
||||
type DistributedCache interface {
|
||||
Get(ctx context.Context, key string, out any) error
|
||||
Set(ctx context.Context, key string, value any, expiration time.Duration) error
|
||||
Delete(ctx context.Context, key ...string) error
|
||||
Ping(ctx context.Context) error
|
||||
}
|
Reference in New Issue
Block a user