Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 550 Bytes

.godocdown.md

File metadata and controls

25 lines (16 loc) · 550 Bytes

tenure-go

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.

Install

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 }}