Registry / utility / tidwall-tinylru

tidwall-tinylru

JSON →
library1.2.1gogounverified

A tiny LRU cache implementation for Go with O(1) operations.

go get github.com/tidwall/tinylru
INSTALL
IMPORT
SIG · TIDWALL-TINYLRU
T
tidwall-tinylru
utilitygov1.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tinylru
github.com/tidwall/tinylru

Create an LRU cache, set and get a value.

package main import ( "fmt" "github.com/tidwall/tinylru" ) func main() { lru := tinylru.New[string, int](100) lru.Set("key", 42) val, ok := lru.Get("key") fmt.Println(val, ok) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
tidwall-tinylru — go get tidwall-tinylru · libregistry