kops/vendor/github.com/hashicorp/golang-lru
Peter Rifel 315c5b3ad2
Upgrade controller-runtime to latest
2020-08-24 10:54:18 -05:00
..
simplelru update deps 2020-03-17 17:41:50 +02:00
.gitignore Populate vendor 2017-07-02 13:10:28 -04:00
2q.go Generated vendor & bazel from `make gomod` 2019-08-25 16:00:41 -04:00
BUILD.bazel Generated vendor & bazel from `make gomod` 2019-08-25 16:00:41 -04:00
LICENSE Populate vendor 2017-07-02 13:10:28 -04:00
README.md Populate vendor 2017-07-02 13:10:28 -04:00
arc.go Generated vendor & bazel from `make gomod` 2019-08-25 16:00:41 -04:00
doc.go Generated vendor & bazel from `make gomod` 2019-08-25 16:00:41 -04:00
go.mod update deps 2020-03-17 17:41:50 +02:00
lru.go Upgrade controller-runtime to latest 2020-08-24 10:54:18 -05:00

README.md

golang-lru

This provides the lru package which implements a fixed-size thread safe LRU cache. It is based on the cache in Groupcache.

Documentation

Full docs are available on Godoc

Example

Using the LRU is very simple:

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()))
}