@@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user