8000 GitHub - thiagozs/go-cache at v1.0.3
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

thiagozs/go-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Cache

Simple cache implementation key, value system.

The cache you can choose between drivers for different storage.

Implementation

  • BuntDB
  • Redis

How to use the cache

Very simple.

cache, err := cache.New(drivers.BUNTDB, 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 6151 the LICENSE file.

2021, thiagozs.

About

Simple cache system

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0