redis

package
v1.0.1-0...-cba1e01 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(o *Options) store.Store

NewStore will create a new redis store with the given options.

Types

type Options

type Options = goredis.Options

Options is a alias for the options for the redis client.

type Store

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

Store represents the redis cache store.

func (*Store) Close

func (s *Store) Close() error

Close store.

func (*Store) Flush

func (s *Store) Flush() error

Flush remove all items from the cache.

func (*Store) Get

func (s *Store) Get(key string) (interface{}, error)

Get will retrieve a item from the cache.

func (*Store) Remove

func (s *Store) Remove(key string) error

Remove will remove a item from the cache.

func (*Store) Result

func (s *Store) Result(key string, value interface{}) error

Result will retrieve a item from the cache and stores the result in the value pointed to by value.

func (*Store) Set

func (s *Store) Set(key string, value interface{}, expiration time.Duration) error

Set will store a item in the cache.

Jump to

Keyboard shortcuts

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