Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
simplelru/ | H | 27-Feb-2019 | - | 367 | 277 | |
.gitignore | H A D | 27-Feb-2019 | 259 | 24 | 18 | |
2q.go | H A D | 27-Feb-2019 | 5.5 KiB | 224 | 147 | |
2q_test.go | H A D | 27-Feb-2019 | 5.3 KiB | 307 | 261 | |
LICENSE | H A D | 27-Feb-2019 | 15.5 KiB | 363 | 265 | |
README.md | H A D | 27-Feb-2019 | 455 | 26 | 19 | |
arc.go | H A D | 27-Feb-2019 | 5.6 KiB | 258 | 179 | |
arc_test.go | H A D | 27-Feb-2019 | 6.5 KiB | 378 | 293 | |
doc.go | H A D | 27-Feb-2019 | 948 | 22 | 1 | |
go.mod | H A D | 27-Feb-2019 | 39 | 2 | 1 | |
lru.go | H A D | 27-Feb-2019 | 2.7 KiB | 117 | 82 | |
lru_test.go | H A D | 27-Feb-2019 | 4 KiB | 222 | 189 |
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