cache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	GetOrSet(key string, val interface{}, cb func(interface{}) (uint, error)) error
	Set(key string, val interface{}, minutes uint) error
	Get(key string, val interface{}) error
	Page(wrt http.ResponseWriter, req *http.Request, contentType string, minutes uint, callback func() ([]byte, error))
	Del(key string) error
	Status() (map[string]int, error)
	Clear() error
}

type RedisProvider

type RedisProvider struct {
	Redis *redis.Pool `inject:""`
}

func (*RedisProvider) Clear

func (p *RedisProvider) Clear() error

func (*RedisProvider) Del

func (p *RedisProvider) Del(key string) error

func (*RedisProvider) Get

func (p *RedisProvider) Get(key string, val interface{}) error

func (*RedisProvider) GetOrSet

func (p *RedisProvider) GetOrSet(key string, val interface{}, cb func(interface{}) (uint, error)) error

func (*RedisProvider) Page

func (p *RedisProvider) Page(wrt http.ResponseWriter, req *http.Request, contentType string, minutes uint, callback func() ([]byte, error))

func (*RedisProvider) Set

func (p *RedisProvider) Set(key string, val interface{}, minutes uint) error

func (*RedisProvider) Status

func (p *RedisProvider) Status() (map[string]int, error)

Jump to

Keyboard shortcuts

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