Documentation ¶
Index ¶
- Variables
- type CacheOpMap
- func (cm *CacheOpMap) CacheOperation(op string, key interface{}, opFunc OpFunc) (data expires.DataExpires)
- func (cm *CacheOpMap) CacheOperationWithError(op string, key interface{}, opFunc OpFuncWithError) (data expires.DataExpires, err error)
- func (cm *CacheOpMap) ClearInvalidate()
- func (cm *CacheOpMap) LazyInitCachePoolOp(op string) CacheUnit
- func (cm *CacheOpMap) PrintAll()
- func (cm *CacheOpMap) RemoveCachePoolOp(op string)
- type CacheUnit
- type OpFunc
- type OpFuncWithError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
GlobalCacheOpMap = CacheOpMap{}
)
Functions ¶
This section is empty.
Types ¶
type CacheOpMap ¶
type CacheOpMap struct {
// contains filtered or unexported fields
}
func (*CacheOpMap) CacheOperation ¶
func (cm *CacheOpMap) CacheOperation(op string, key interface{}, opFunc OpFunc) (data expires.DataExpires)
func (*CacheOpMap) CacheOperationWithError ¶
func (cm *CacheOpMap) CacheOperationWithError(op string, key interface{}, opFunc OpFuncWithError) (data expires.DataExpires, err error)
func (*CacheOpMap) ClearInvalidate ¶
func (cm *CacheOpMap) ClearInvalidate()
ClearInvalidate 清除已过期的数据(一般用不到)
func (*CacheOpMap) LazyInitCachePoolOp ¶
func (cm *CacheOpMap) LazyInitCachePoolOp(op string) CacheUnit
func (*CacheOpMap) RemoveCachePoolOp ¶
func (cm *CacheOpMap) RemoveCachePoolOp(op string)
type CacheUnit ¶
type CacheUnit interface { Delete(key interface{}) Load(key interface{}) (value expires.DataExpires, ok bool) LoadOrStore(key interface{}, value expires.DataExpires) (actual expires.DataExpires, loaded bool) Range(f func(key interface{}, value expires.DataExpires) bool) Store(key interface{}, value expires.DataExpires) LockKey(key interface{}) UnlockKey(key interface{}) }
type OpFunc ¶
type OpFunc func() expires.DataExpires
type OpFuncWithError ¶
type OpFuncWithError func() (expires.DataExpires, error)
Click to show internal directories.
Click to hide internal directories.