Documentation ¶
Index ¶
- Constants
- type CacheFactory
- type CacheOperation
- type Factory
- func (this *Factory) Close()
- func (this *Factory) Delete(key string)
- func (this *Factory) Get(key string) (value interface{}, found bool)
- func (this *Factory) Has(key string) bool
- func (this *Factory) OnOperation(f func(op CacheOperation, item *Item))
- func (this *Factory) Reset()
- func (this *Factory) Set(key string, value interface{}, duration ...time.Duration) *Item
- type Item
Constants ¶
View Source
const ( CacheOperationSet = "set" CacheOperationDelete = "delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheFactory ¶
type CacheFactory struct {
// contains filtered or unexported fields
}
缓存集成器,用户让别的对象拥有使用缓存的能力
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
缓存管理器
func (*Factory) OnOperation ¶
func (this *Factory) OnOperation(f func(op CacheOperation, item *Item))
设置操作回调
Click to show internal directories.
Click to hide internal directories.