Documentation
¶
Index ¶
- type Cache
- type LRUCache
- func (c *LRUCache) Delete(key string)
- func (c *LRUCache) GC()
- func (c *LRUCache) Get(key string) (interface{}, bool)
- func (c *LRUCache) Set(key string, value interface{})
- func (c *LRUCache) SetEx(key string, value interface{}, ttl time.Duration)
- func (c *LRUCache) StartAutoGC(interval time.Duration)
- func (c *LRUCache) Status() *Status
- func (c *LRUCache) StopAutoGC()
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Set(key string, value interface{}) // 设置缓存 Get(key string) (interface{}, bool) // 获取缓存 Delete(key string) // 删除缓存 Status() *Status // 当前状态 GC() // 垃圾回收 }
this is a interface which defines some common functions
Click to show internal directories.
Click to hide internal directories.