Simple cache implementation key, value system.
The cache you can choose between drivers for different storage.
- BuntDB
- Redis
- GoCache memory cache
Very simple.
cache, err := cache.New(opts...)
if err != nil {
fmt.Println("Error:", err)
return
}
cache.WriteKeyVal("key1", "value1")
cache.WriteKeyVal("key2", "value2")
v1, err := cache.GetVal("key1")
if err != nil {
fmt.Println("Error:", err)
return
}
A example of a cache implementation. You can find it in the examples
folder.
Our version numbers follow the semantic versioning specification. You can see the available versions by checking the tags on this repository. For more details about our license model, please take a look at the LICENSE file.
2021, thiagozs.