lru

module
v0.0.0-...-991d2e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2020 License: MIT

README

LRU

pkg/lru包提供一个固定大小的线程安全的LRU缓存。

文档

api文档参考:godoc

示例

l, _ := New(128)
for i := 0; i < 256; i++ {
    l.Add(i, nil)
}
if l.Len() != 128 {
    panic(fmt.Sprintf("bad len: %v", l.Len()))
}

Directories

Path Synopsis
examples
2q
arc
internal
lru
pkg
lru
lru包提供三种不同复杂度的LRU缓存算法.
lru包提供三种不同复杂度的LRU缓存算法.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL