Registry / utility / hashicorp-golang-lru-v2

hashicorp-golang-lru-v2

JSON →
library2.0.7gogounverified

A Go library providing three different LRU cache implementations with varying sophistication.

go get github.com/hashicorp/golang-lru/v2
INSTALL
IMPORT
SIG · HASHICORP-GOLANG-L
H
hashicorp-golang-lru-v2
utilitygov2.0.7
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.

lru
github.com/hashicorp/golang-lru/v2

Create and use a simple LRU cache.

package main import ( "fmt" "github.com/hashicorp/golang-lru/v2" ) func main() { cache, _ := lru.New[int, string](100) cache.Add(1, "one") if val, ok := cache.Get(1); ok { fmt.Println(val) } }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
hashicorp-golang-lru-v2 — go get hashicorp-golang-lru-v2 · libregistry