Go Local Cache provides a simple cache mechanism for storing locally.
Go Local Cache currently only supports in-memory cache, but will also support file cache.
go get github.com/emahiro/glc
mc := glc.NewMemoryCache(glc.DefaultMemoryCacheExpires)
// Set
if err := mc.Set("cacheKey", []byte('hoge')); err != nil {
log.Fatal(err)
}
// Get
data := mc.Get("cacheKey")
Usage is similar to in memory cache.
Go Local Cache creates tmp
directory for file cache.
MIT