thiagozs / go-cache

Simple cache system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Cache

Simple cache implementation key, value system.

The cache you can choose between drivers for different storage.

Implementation

  • BuntDB
  • Redis
  • GoCache memory cache

How to use the 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.

Versioning and license

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.

About

Simple cache system

License:Other


Languages

Language:Go 97.1%Language:Makefile 2.9%