cache

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2017 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Close() error
	Get(key string, result interface{}) (err error)
	Put(key string, obj interface{}) (err error)
	Delete(key string) (err error)
}

Cache interface

func New

func New(url string) Cache

New redis cache

type Redis

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

Redis cache main type

func (*Redis) Close

func (c *Redis) Close() error

Close the redis connections

func (*Redis) Delete

func (c *Redis) Delete(key string) (err error)

Delete a key from cache

func (*Redis) Get

func (c *Redis) Get(key string, result interface{}) (err error)

Get a key from cache

func (*Redis) Put

func (c *Redis) Put(key string, obj interface{}) (err error)

Put cache something

Jump to

Keyboard shortcuts

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