Files
2026-10-08 16:50:13 +08:00

15 lines
403 B
Go

package cachev2
import "time"
// Driver 缓存驱动接口定义
type Driver interface {
IsExist(key string) bool
Get(key string) (*string, error)
Set(key string, value interface{}, expire time.Duration) error
SetNX(key string, value interface{}, expiration time.Duration) (bool, error)
ScanKeys(match string) (keys []string, err error)
Del(keys ...string) (n int64, err error)
Close() error
}