Convenient Golang caching library
$ go get github.com/byliuyang/xcache
import "github.com/byliuyang/xcache"
// Initialize buffer with length of 3 and LRU replacement policy
cache := NewBuilder().
Capacity(3).
LRU().
Build()
cache.Set(1, 4)
value, err := cache.Get(1)
- Harry Liu - Initial work - byliuyang
This library is maintained under the MIT License.