ssgf_utils/sms_tool/cache_model.go
2025-06-18 17:37:21 +08:00

14 lines
394 B
Go

package sms_tool
import (
"context"
"time"
)
type ICacheAdapter interface {
Get(ctx context.Context, key string) (value interface{}, err error)
Set(ctx context.Context, key string, value interface{}, expire time.Duration) (err error)
Del(ctx context.Context, key string) (err error)
SetNX(ctx context.Context, key string, value interface{}, expire time.Duration) (ok bool, err error)
}