1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00
Files
go-mixed/cache/distributed_cache.go
2023-08-25 15:31:00 +08:00

15 lines
324 B
Go

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
}