velero/vendor/github.com/hashicorp/golang-lru
Andy Goldstein 742f45849f Switch to dep & update dependencies
Switch to dep.

Update the following:
- azure-sdk-for-go to 10.2.1-beta
- go-autorest to 8.1.1
- client-go to 4.0.0

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
2017-09-06 13:41:25 -04:00
..
simplelru Switch to dep & update dependencies 2017-09-06 13:41:25 -04:00
.gitignore Initial commit 2017-08-02 13:27:17 -04:00
2q.go Initial commit 2017-08-02 13:27:17 -04:00
LICENSE Initial commit 2017-08-02 13:27:17 -04:00
README.md Initial commit 2017-08-02 13:27:17 -04:00
arc.go Initial commit 2017-08-02 13:27:17 -04:00
lru.go Initial commit 2017-08-02 13:27:17 -04: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()))
}