ceph-csi/vendor/github.com/hashicorp/golang-lru
Humble Chirammal 34fc1d847e Changes to accommodate client-go changes and kube vendor update
to v1.18.0

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-04-14 10:50:12 +00:00
..
simplelru Add recover middleware for grpc server 2019-08-01 11:02:27 +00:00
.gitignore Migrate from dep to go module 2020-03-17 10:44:07 +00:00
2q.go vendor update for E2E framework 2019-06-04 11:39:42 +05:30
arc.go vendor update for E2E framework 2019-06-04 11:39:42 +05:30
doc.go vendor update for E2E framework 2019-06-04 11:39:42 +05:30
go.mod Migrate from dep to go module 2020-03-17 10:44:07 +00:00
LICENSE vendor update for E2E framework 2019-06-04 11:39:42 +05:30
lru.go Changes to accommodate client-go changes and kube vendor update 2020-04-14 10:50:12 +00:00
README.md Migrate from dep to go module 2020-03-17 10:44:07 +00:00

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