Registry / utility / die-net-lrucache

die-net-lrucache

JSON →
library0.0.0-20220628165024-20a71bc65bf1gogounverified

Package lrucache provides a byte-size-limited implementation of httpcache.Cache that stores data in memory.

go get github.com/die-net/lrucache
INSTALL
IMPORT
SIG · DIE-NET-LRUCACHE
D
die-net-lrucache
utilitygov0.0.0-20220628165024-20a71bc65bf1
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.

lrucache
github.com/die-net/lrucache

Creates an LRU cache with a 1 MB size limit, sets and retrieves a value.

package main import ( "fmt" "github.com/die-net/lrucache" ) func main() { cache := lrucache.New(1024 * 1024) // 1 MB limit cache.Set("key", []byte("value")) val, ok := cache.Get("key") fmt.Println(string(val), ok) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20220628165024-20a71bc65bf1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
die-net-lrucache — go get die-net-lrucache · libregistry