redis

package
v0.0.0-...-5117fa9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisCache

func NewRedisCache() cache.Cache

NewRedisCache create new redis cache with default collection name.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func (*Cache) Decr

func (t *Cache) Decr(key string) error

func (*Cache) Delete

func (t *Cache) Delete(key string) error

func (*Cache) FlushAll

func (t *Cache) FlushAll() error

func (*Cache) Get

func (t *Cache) Get(key string, dest interface{}) error

func (*Cache) GetMulti

func (t *Cache) GetMulti(keys []string) []interface{}

the int,string return origin,other need decode

func (*Cache) Incr

func (t *Cache) Incr(key string) error

func (*Cache) IsExist

func (t *Cache) IsExist(key string) bool

func (*Cache) Set

func (t *Cache) Set(key string, val interface{}, expire time.Duration) error

func (*Cache) StartAndGC

func (t *Cache) StartAndGC(config map[string]interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL