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.
cache
✓ github.com/robfig/go-cache
Create a cache, set a key, and retrieve it.
package main
import (
"fmt"
"github.com/robfig/go-cache"
"time"
)
func main() {
c := cache.New(5*time.Minute, 10*time.Minute)
c.Set("key", "value", cache.DefaultExpiration)
val, _ := c.Get("key")
fmt.Println(val)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20130306151617-9fc39e0dbf62latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.