2021-05-23 23:27:41 +00:00
|
|
|
package cache
|
|
|
|
|
|
|
|
import (
|
|
|
|
. "../common"
|
|
|
|
)
|
|
|
|
|
|
|
|
type CacheIns interface {
|
|
|
|
//set(key string, value interface{}, time int64)
|
|
|
|
//get(key string) interface{}
|
|
|
|
//delete(key string)
|
2021-05-28 14:52:22 +00:00
|
|
|
GetError() *Error
|
|
|
|
SetError(err *Error)
|
2021-05-23 23:27:41 +00:00
|
|
|
Cache(key string, data ...interface{}) *Obj
|
|
|
|
}
|
|
|
|
|
|
|
|
//单条缓存数据
|
|
|
|
type cacheData struct {
|
|
|
|
time int64
|
|
|
|
data interface{}
|
|
|
|
}
|