redis

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigParser

func ConfigParser(conf interface{}) redis.Options

ConfigParser config parser for redis

func NewCacher

func NewCacher(options *redis.Options) (adapter.ICacherEngine, error)

NewCacher new Redis Cacher

Types

type Cacher

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

Cacher represent Redis Cacher

func (*Cacher) Decr

func (c *Cacher) Decr(key string) error

Decr decrement key value

func (*Cacher) Delete

func (c *Cacher) Delete(key string) error

Delete delete key

func (*Cacher) Flush

func (c *Cacher) Flush() error

Flush flush all data

func (*Cacher) Get

func (c *Cacher) Get(key string) interface{}

Get key value

func (*Cacher) GetEngine

func (c *Cacher) GetEngine() interface{}

GetEngine get default Engine

func (*Cacher) Incr

func (c *Cacher) Incr(key string) error

Incr increment key value

func (*Cacher) IsExist

func (c *Cacher) IsExist(key string) bool

IsExist check key is exist

func (*Cacher) Put

func (c *Cacher) Put(key string, val interface{}, timeout int64) error

Put put key value with (timeout) expiration

Jump to

Keyboard shortcuts

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