client/vendor/github.com/hashicorp/golang-lru
Naomi Seyfer 25c726453e Update serving dependency to 0.8; change all import paths (#368)
* Update serving to 0.8. Try building.

* Find the right serving version

* Change our own import path to knative.dev to match

* Remove dependency on old version of client

* Update yaml template

* Add sleep to test to deal with race

* fix merge conflict

* Update vendor modules
2019-08-15 18:09:08 -07:00
..
simplelru Update serving dependency to 0.8; change all import paths (#368) 2019-08-15 18:09:08 -07:00
.gitignore Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
2q.go Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
LICENSE Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
README.md Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
arc.go Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
doc.go Actually, vendor everything (#59) 2019-04-05 04:08:57 -07:00
go.mod Update serving dependency to 0.8; change all import paths (#368) 2019-08-15 18:09:08 -07:00
lru.go Update serving dependency to 0.8; change all import paths (#368) 2019-08-15 18:09:08 -07: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()))
}