Skip to content

This project encapsulates multiple db servers, redis、ledis、memcache、file、memory、nosql、postgresql

License

Notifications You must be signed in to change notification settings

huntsman-li/go-cache

Repository files navigation

go-cache

This project encapsulates multiple db servers, redis、ledis、memcache、file、memory、nosql、postgresql

example

package main

import (
	"github.com/huntsman-li/go-cache"
	_ "github.com/huntsman-li/go-cache/redis"
)

func main() {
	ca, err := cache.Cacher(cache.Options{
		Adapter:       "redis",
		AdapterConfig: "addr=127.0.0.1:6379",
		OccupyMode:    true,
	})

	if err != nil {
		panic(err)
	}

	ca.Put("liyan", "cache", 60)
}

About

This project encapsulates multiple db servers, redis、ledis、memcache、file、memory、nosql、postgresql

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages