Skip to content

reddotpay/redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

redis

-- import "github.com/reddotpay/redis"

Usage

var Pool *redigo.Pool

Pool contains Redis pool

func Delete

func Delete(key string) error

Delete deletes a value by key

func NewPool

func NewPool(endpoint string, maxIdle int, idleTimeout time.Duration) *redigo.Pool

NewPool initialises a new Redis pool

func Retrieve

func Retrieve(key string) (interface{}, error)

Retrieve retrieves value by key

func Store

func Store(key string, value interface{}, expiryInSeconds int) error

Store stores key-value pairs in Redis with expiry