Registry / utility / jellydator-ttlcache-v2

jellydator-ttlcache-v2

JSON →
library2.11.1gogounverified

An in-memory cache with TTL support, thread-safe, and with generics.

go get github.com/jellydator/ttlcache/v2
INSTALL
IMPORT
SIG · JELLYDATOR-TTLCACH
J
jellydator-ttlcache-v2
utilitygov2.11.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.

ttlcache
github.com/jellydator/ttlcache/v2

Creates a TTL cache and sets a key with a one-minute expiration.

package main import ( "fmt" "time" "github.com/jellydator/ttlcache/v2" ) func main() { cache := ttlcache.New[string, string]() cache.Set("key", "value", time.Minute) val, err := cache.Get("key") if err == nil { fmt.Println(val) } }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
jellydator-ttlcache-v2 — go get jellydator-ttlcache-v2 · libregistry