Documentation ¶
Overview ¶
lfu (least frequently counter) will overwrite cached items that have been counter the least when the cache limit is reached.
Index ¶
- type CacheItem
- type CacheList
- func (list *CacheList) Cap() uint
- func (list *CacheList) ClearHard()
- func (list *CacheList) ClearSoft()
- func (list *CacheList) ClearTableNils()
- func (list *CacheList) ClearTables()
- func (list *CacheList) CreateCacheableItem(content interface{}) interfaces.CacheableItem
- func (list *CacheList) Delete(id Snowflake)
- func (list *CacheList) Efficiency() float64
- func (list *CacheList) Get(id Snowflake) (ret interfaces.CacheableItem, exists bool)
- func (list *CacheList) RefreshAfterDiscordUpdate(itemI interfaces.CacheableItem)
- func (list *CacheList) Set(id Snowflake, newItemI interfaces.CacheableItem)
- func (list *CacheList) Size() uint
- type Snowflake
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheList ¶
func (*CacheList) ClearTableNils ¶ added in v0.8.4
func (list *CacheList) ClearTableNils()
func (*CacheList) ClearTables ¶ added in v0.8.4
func (list *CacheList) ClearTables()
func (*CacheList) CreateCacheableItem ¶
func (list *CacheList) CreateCacheableItem(content interface{}) interfaces.CacheableItem
CreateCacheableItem ...
func (*CacheList) Get ¶
func (list *CacheList) Get(id Snowflake) (ret interfaces.CacheableItem, exists bool)
Get get an content from the list.
func (*CacheList) RefreshAfterDiscordUpdate ¶
func (list *CacheList) RefreshAfterDiscordUpdate(itemI interfaces.CacheableItem)
RefreshAfterDiscordUpdate ...
func (*CacheList) Set ¶
func (list *CacheList) Set(id Snowflake, newItemI interfaces.CacheableItem)
Set set adds a new content to the list or returns false if the content already exists
Click to show internal directories.
Click to hide internal directories.