csi-driver-nfs/vendor/github.com/hashicorp/golang-lru
Mayank Shah 002b246eb0 Update k8s.io/kubernetes to use v1.18.0
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2020-11-02 20:33:59 +05:30
..
simplelru Add vendor dependencies 2019-02-07 14:49:15 +05:30
.gitignore Update vendor from go modules 2020-02-02 15:55:23 +01:00
2q.go Add vendor dependencies 2019-02-07 14:49:15 +05:30
LICENSE Add vendor dependencies 2019-02-07 14:49:15 +05:30
README.md Update vendor from go modules 2020-02-02 15:55:23 +01:00
arc.go Add vendor dependencies 2019-02-07 14:49:15 +05:30
doc.go Add vendor dependencies 2019-02-07 14:49:15 +05:30
go.mod Update vendor from go modules 2020-02-02 15:55:23 +01:00
lru.go Update k8s.io/kubernetes to use v1.18.0 2020-11-02 20:33:59 +05:30

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