cache

package
v0.0.0-...-52f8398 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2016 License: MIT Imports: 4 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 {
	Set(string, interface{}, time.Duration) error
	Get(string, interface{}) error
	Del(string) error
	Status() (map[string]int, error)
	Clear() error
}

Provider cache provider

type RedisProvider

type RedisProvider struct {
	Redis  *redis.Pool
	Prefix string
}

RedisProvider cache redis provider

func (*RedisProvider) Clear

func (p *RedisProvider) Clear() error

Clear clear all caches

func (*RedisProvider) Del

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

Del del cache

func (*RedisProvider) Get

func (p *RedisProvider) Get(k string, v interface{}) error

Get get cache

func (*RedisProvider) Set

func (p *RedisProvider) Set(k string, v interface{}, t time.Duration) error

Set set cache

func (*RedisProvider) Status

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

Status status

Jump to

Keyboard shortcuts

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