Documentation ¶
Index ¶
- type Cache
- type EvictionPolicy
- type FrequencyListItem
- type LFUCache
- func (c *LFUCache) Delete(key string) (err error)
- func (c *LFUCache) DeleteExpired(timeInterval time.Duration)
- func (c *LFUCache) Get(key string) (value interface{}, err error)
- func (c *LFUCache) Info() (info map[string]interface{}, err error)
- func (c *LFUCache) Purge() (err error)
- func (c *LFUCache) Set(key string, value interface{}, timeToLive ...time.Duration) (err error)
- type LFUCacheItem
- type LRUCache
- func (c *LRUCache) Delete(key string) (err error)
- func (c *LRUCache) DeleteExpired(timeInterval time.Duration)
- func (c *LRUCache) Get(key string) (value interface{}, err error)
- func (c *LRUCache) Info() (info map[string]interface{}, err error)
- func (c *LRUCache) Purge() (err error)
- func (c *LRUCache) Set(key string, value interface{}, timeToLive ...time.Duration) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type EvictionPolicy ¶
type EvictionPolicy string
const ( LRU EvictionPolicy = "LRU" LFU EvictionPolicy = "LFU" )
func (*EvictionPolicy) Set ¶
func (ep *EvictionPolicy) Set(value string) error
func (*EvictionPolicy) String ¶
func (ep *EvictionPolicy) String() string
type FrequencyListItem ¶
type FrequencyListItem struct {
// contains filtered or unexported fields
}
type LFUCache ¶
type LFUCache struct {
// contains filtered or unexported fields
}
func (*LFUCache) DeleteExpired ¶
type LFUCacheItem ¶
type LFUCacheItem struct {
// contains filtered or unexported fields
}
type LRUCache ¶
type LRUCache struct {
// contains filtered or unexported fields
}
func (*LRUCache) DeleteExpired ¶
Click to show internal directories.
Click to hide internal directories.