The drivers uses golang sync to store the cache data.
package main
import (
"log"
"time"
"github.com/faabiosr/cachego/sync"
)
func main() {
cache := sync.New()
if err := cache.Save("user_id", "1", 10*time.Second); err != nil {
log.Fatal(err)
}
id, err := cache.Fetch("user_id")
if err != nil {
log.Fatal(err)
}
log.Printf("user id: %s \n", id)
}