Registry / utility / renekroon-ttlcache

renekroon-ttlcache

JSON →
library1.7.0gogounverified

An in-memory cache with per-entry TTL (time-to-live) expiration, supporting callbacks on eviction.

go get github.com/ReneKroon/ttlcache
INSTALL
IMPORT
SIG · RENEKROON-TTLCACHE
R
renekroon-ttlcache
utilitygov1.7.0
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/ReneKroon/ttlcache

Create a cache, set a key with a TTL, and retrieve it.

package main import ( "fmt" "time" "github.com/ReneKroon/ttlcache" ) func main() { cache := ttlcache.NewCache() cache.Set("key", "value", time.Minute) val, _ := cache.Get("key") fmt.Println(val) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
renekroon-ttlcache — go get renekroon-ttlcache · libregistry