cache

package
v0.0.0-...-28b3ec9 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 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 RedisStore

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

RedisStore redis cache store

func (*RedisStore) Flush

func (p *RedisStore) Flush() error

Flush clear cache items

func (*RedisStore) Get

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

Get get from cache

func (*RedisStore) Keys

func (p *RedisStore) Keys() ([]string, error)

Keys list cache items

func (*RedisStore) Set

func (p *RedisStore) Set(key string, val interface{}, ttl uint) error

Set cache item

type Store

type Store interface {
	Flush() error
	Keys() ([]string, error)
	Set(key string, val interface{}, ttl uint) error
	Get(key string, val interface{}) error
}

Store cache store

Jump to

Keyboard shortcuts

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