Documentation ¶
Overview ¶
* * *@author 吴昊轩 *@create 2019-10-2319:02
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LFUCache ¶
type LFUCache struct {
// contains filtered or unexported fields
}
LFUCache 实现了 Least Frequently Used (LFU) cache
type LFUCache1 ¶
type LFUCache1 struct { Cap int Keym map[int]*list.Element //通过Key查找 Cntm map[int]*list.List //通过次数查找 MinCnt int //最小的访问次数,只有在put需要删除项目,且缓存容量达上限时才用的上,新的项目cnt必然是1,所以只要记录最小的即可 }
func Constructor1 ¶
Click to show internal directories.
Click to hide internal directories.