mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-04-02 21:52:40 +08:00

Ingress extensions/v1beta1 -> networking.k8s.io/v1beta1 Kubernetes-commit: 7d75b73e1d72cef7a0f0e2804f8e0a582ccb6b61
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()))
}