Tenure-go
is a thread-safe LRU cache instance that uses hashmap lookups and an Open Doubly Linked List to enact the Least-Recently Used algorithm.
Tenure-go
's internal cache utilizes the Go's sync/mutex locking mechanism to ensure thread-safety.
go get -u github.com/MatthewZito/tenure-go
import (
tenure "github.com/MatthewZito/tenure-go"
)
lru, err := New(10, cb)
lru.Put("key", "value")
--
{{ .Emit }}