Documentation ¶
Index ¶
- Constants
- type Cache
- type CleanCallBackFunc
- type KVCache
- type MemoryCache
- func (right *MemoryCache) ClearAll()
- func (right *MemoryCache) Fetch(id string) interface{}
- func (right *MemoryCache) Put(data interface{}, maxAge float64) string
- func (right *MemoryCache) Release()
- func (right *MemoryCache) Remove(id string)
- func (right *MemoryCache) Search(opr SearchOpr) interface{}
- type MemoryKVCache
- func (right *MemoryKVCache) ClearAll()
- func (right *MemoryKVCache) Fetch(key string) interface{}
- func (right *MemoryKVCache) GetAll() (ret []interface{})
- func (right *MemoryKVCache) Put(key string, data interface{}, maxAge float64) string
- func (right *MemoryKVCache) Release()
- func (right *MemoryKVCache) Remove(key string)
- func (right *MemoryKVCache) Search(opr SearchOpr) interface{}
- type SearchOpr
Constants ¶
View Source
const MaxAgeValue = -1
MaxAgeValue 最大存放期限,无限期
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { // maxAge单位minute Put(data interface{}, maxAge float64) string Fetch(id string) interface{} Search(opr SearchOpr) interface{} Remove(id string) ClearAll() Release() }
Cache 缓存对象
type CleanCallBackFunc ¶ added in v1.3.24
type CleanCallBackFunc func(string)
type KVCache ¶
type KVCache interface { // Put maxAge单位minute Put(key string, data interface{}, maxAge float64) string Fetch(key string) interface{} Search(opr SearchOpr) interface{} Remove(key string) GetAll() []interface{} ClearAll() Release() }
KVCache 缓存对象
type MemoryCache ¶
type MemoryCache chan commandData
MemoryCache 内存缓存
func (*MemoryCache) Put ¶
func (right *MemoryCache) Put(data interface{}, maxAge float64) string
Put 投放数据,返回数据的唯一标示
func (*MemoryCache) Search ¶ added in v1.2.7
func (right *MemoryCache) Search(opr SearchOpr) interface{}
type MemoryKVCache ¶
type MemoryKVCache chan commandData
MemoryKVCache 内存缓存
func (*MemoryKVCache) GetAll ¶
func (right *MemoryKVCache) GetAll() (ret []interface{})
GetAll 获取所有的数据
func (*MemoryKVCache) Put ¶
func (right *MemoryKVCache) Put(key string, data interface{}, maxAge float64) string
Put 投放数据,返回数据的唯一标示
func (*MemoryKVCache) Search ¶ added in v1.2.7
func (right *MemoryKVCache) Search(opr SearchOpr) interface{}
Click to show internal directories.
Click to hide internal directories.