ceph-csi/vendor/github.com/hashicorp/golang-lru
Madhu Rajanna 51a5bde97f ci: update golang dependencies to 1.17.5 release
updating the depencendices to golang 1.17.5
release

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-12-13 07:32:54 +00:00
..
simplelru rebase: bump github.com/hashicorp/vault/api from 1.1.1 to 1.2.0 2021-10-20 13:57:39 +00:00
.gitignore rebase: bump github.com/hashicorp/vault/api from 1.1.1 to 1.2.0 2021-10-20 13:57:39 +00:00
2q.go rebase: bump github.com/hashicorp/vault/api from 1.1.1 to 1.2.0 2021-10-20 13:57:39 +00:00
arc.go rebase: bump github.com/hashicorp/vault/api from 1.1.1 to 1.2.0 2021-10-20 13:57:39 +00:00
doc.go rebase: bump github.com/hashicorp/vault/api from 1.1.1 to 1.2.0 2021-10-20 13:57:39 +00:00
LICENSE rebase: bump github.com/hashicorp/vault/api from 1.1.1 to 1.2.0 2021-10-20 13:57:39 +00:00
lru.go rebase: bump github.com/hashicorp/vault/api from 1.1.1 to 1.2.0 2021-10-20 13:57:39 +00:00
README.md rebase: bump github.com/hashicorp/vault/api from 1.1.1 to 1.2.0 2021-10-20 13:57:39 +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()))
}