Registry / utility / muesli-cache2go

muesli-cache2go

JSON →
library0.0.0-20221011235721-518229cd8021gogounverified

A simple in-memory cache library for Go with expiration support.

go get github.com/muesli/cache2go
INSTALL
IMPORT
SIG · MUESLI-CACHE2GO
M
muesli-cache2go
utilitygov0.0.0-20221011235721-518229cd8021
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.

cache2go
github.com/muesli/cache2go

Create a cache table, add an item with expiration, and retrieve it.

package main import ( "fmt" "time" "github.com/muesli/cache2go" ) func main() { cache := cache2go.Cache("myCache") cache.Add("key", 10*time.Second, "value") entry, _ := cache.Value("key") fmt.Println(entry.Data().(string)) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20221011235721-518229cd8021latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
muesli-cache2go — go get muesli-cache2go · libregistry