8000 GitHub - thiagozs/go-cache at v1.0.0
[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

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Cache

Simple cache implementation key, value system. Core use for this projet are BuntDB

How to use the cache

Very simple.

package main

import (
	"github.com/thiagozs/go-cache/v1/cache"
)

func main() {
	println("Hello, world!")

	cache, err := cache.New("./db", "db.db", 200, false)
	if err != nil {
		println(err)
	}
	if err := cache.WriteKeyVal("key", "value"); err != nil {
		println(err)
		return
	}

	rr, err := cache.GetVal("key")
	if err != nil {
		println(err)
		return
	}
	println(rr)
}

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0