• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

simplelru/H16-Jan-2020-

.gitignoreH A D16-Jan-2020259

2q.goH A D16-Jan-20205.5 KiB

2q_test.goH A D16-Jan-20205.3 KiB

LICENSEH A D16-Jan-202015.5 KiB

README.mdH A D16-Jan-2020455

arc.goH A D16-Jan-20205.6 KiB

arc_test.goH A D16-Jan-20206.5 KiB

doc.goH A D16-Jan-2020948

go.modH A D16-Jan-202048

lru.goH A D16-Jan-20203.6 KiB

lru_test.goH A D16-Jan-20205.4 KiB

README.md

1golang-lru
2==========
3
4This provides the `lru` package which implements a fixed-size
5thread safe LRU cache. It is based on the cache in Groupcache.
6
7Documentation
8=============
9
10Full docs are available on [Godoc](http://godoc.org/github.com/hashicorp/golang-lru)
11
12Example
13=======
14
15Using the LRU is very simple:
16
17```go
18l, _ := New(128)
19for i := 0; i < 256; i++ {
20    l.Add(i, nil)
21}
22if l.Len() != 128 {
23    panic(fmt.Sprintf("bad len: %v", l.Len()))
24}
25```
26