Documentation
¶
Index ¶
- Constants
- type Cache
- func (c *Cache) Bump(key string)
- func (c *Cache) Get(key string) interface{}
- func (c *Cache) Hits() int64
- func (c *Cache) Len() int
- func (c *Cache) Misses() int64
- func (c *Cache) RemoveItem(key string)
- func (c *Cache) Set(key string, value interface{})
- func (c *Cache) Start()
- func (c *Cache) Stop()
- func (c *Cache) Trim(num int)
- type CacheOptions
- type CacheStrategy
- type CachedItem
Constants ¶
View Source
const ( CacheStrategyRandom = CacheStrategy(1) CacheStrategyOldest = CacheStrategy(2) CacheStrategyOldestLRU = CacheStrategy(3) CacheStrategyLFU = CacheStrategy(4) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func NewCache ¶
func NewCache(c CacheOptions) *Cache
func (*Cache) RemoveItem ¶
type CacheOptions ¶
type CacheStrategy ¶
type CacheStrategy int
type CachedItem ¶
type CachedItem struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.