Files
jx-callback/business/jxutils/cache/cache.go
richboo111 2e33b86a7b v2
2024-02-06 14:42:51 +08:00

26 lines
714 B
Go

package cache
import (
"time"
)
type ICacher interface {
FlushKeys(prefix string) error
Set(key string, value interface{}, expiration time.Duration) error
Del(key string) error
Get(key string) interface{}
GetAs(key string, ptr interface{}) error
Keys(prefix string) ([]string, error)
GetString(key string) string
FlushDB() error
Incr(key string) error
LRange(key string) (retVal []string)
Exists(keys ...string) (int64, error)
RPush(key string, value interface{}) error
Expire(key string, expiration time.Duration) error
LRem(key string, count int, value interface{}) error
LSet(key string, index int, value interface{}) error
ExpireResult(key string, expiration time.Duration) (bool, error)
}