DockerCLI/vendor/github.com/hashicorp/golang-lru
CrazyMax 7e560ae76f
vendor with go mod
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-12-16 21:16:01 +01:00
..
simplelru bump hashicorp/golang-lru v0.5.3 2019-12-12 21:21:22 +01:00
.gitignore vendor with go mod 2021-12-16 21:16:01 +01:00
2q.go Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
LICENSE Add a common interface between different Kubernetes Stack API versions and use it in kubernetes stack commands 2018-04-30 11:27:22 +02:00
README.md Add a common interface between different Kubernetes Stack API versions and use it in kubernetes stack commands 2018-04-30 11:27:22 +02:00
arc.go Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
doc.go Bump some dependencies to more recent versions (and tagged if available) 2018-07-25 14:16:41 +02:00
go.mod bump hashicorp/golang-lru v0.5.3 2019-12-12 21:21:22 +01:00
lru.go bump hashicorp/golang-lru v0.5.3 2019-12-12 21:21:22 +01: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()))
}