cache

package
v0.0.0-...-f65b48a Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Store Store `inject:""`
}

Cache cache

func (*Cache) Get

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

Get get from cache

func (*Cache) Set

func (p *Cache) Set(key string, val interface{}, ttl time.Duration) error

Set cache item

type Store

type Store interface {
	Set(key string, val []byte, ttl time.Duration) error
	Get(key string) ([]byte, error)
	Flush() error
	Keys() ([]string, error)
	Status() (string, error)
}

Store store

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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