mirror of
https://github.com/charlienet/go-mixed.git
synced 2025-07-18 00:22:41 +08:00
15 lines
324 B
Go
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
|
|
}
|