Skip to content

whosonfirst/go-cache-sqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-cache-sqlite

SQLite driver for the whosonfirst/go-cache interface

Important

Work in progress. Documentation to follow.

Usage

Error handling omitted for the sake of brevity.

import (
	"context"
	"github.com/whosonfirst/go-cache"
	_ "github.com/whosonfirst/go-cache-sqlite"
	"io"
	"os"
	"strings"
)

func main() {

	ctx := context.Background()
	c, _ := cache.NewCache(ctx, "sqlite://?dsn=test.db")

	cache.SetString(ctx, c, "hello", "world")

	r, _ := c.Get(ctx, "hello")
	io.Copy(os.Stdout, r)
}

See also

About

SQLite driver for the whosonfirst/go-cache interface

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages