Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 481 Bytes

README.md

File metadata and controls

29 lines (23 loc) · 481 Bytes

gocache

wrapper for all (to-be) kinds of imdb memory cache

Supported providers

  • Redis

Install

$ go get github.com/febytanzil/gocache

Usage

package main

import (
    "github.com/febytanzil/gocache/redis"
    "time"
)

func main() {
    basicRedis := redis.NewBasic("127.0.0.1:6379", redis.WithConnection(30, 10, 60*time.Second))
    
    err := basicRedis.Set("key", "value", 60*time.Second)
    if nil != err {
    	// handle the error
    }
}