redis

package
v0.0.0-...-8083dd1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Pool      *redis.Pool
	Prefix    string
	TTL       time.Duration
	ExtendTTL bool
	Skip      func(*datastore.Key) bool
}

Cache implement Cache interface

func (*Cache) Del

func (cache *Cache) Del(key *datastore.Key) error

Del dels data

func (*Cache) DelMulti

func (cache *Cache) DelMulti(keys []*datastore.Key) error

DelMulti dels multi data

func (*Cache) Get

func (cache *Cache) Get(key *datastore.Key, dst interface{}) error

Get gets data

func (*Cache) GetMulti

func (cache *Cache) GetMulti(keys []*datastore.Key, dst interface{}) error

GetMulti gets multi data

func (*Cache) Set

func (cache *Cache) Set(key *datastore.Key, src interface{}) error

Set sets data

func (*Cache) SetMulti

func (cache *Cache) SetMulti(keys []*datastore.Key, src interface{}) error

SetMulti sets data

Jump to

Keyboard shortcuts

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