cache

package
v0.0.0-...-e8acdfa Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheLogger

type CacheLogger struct {
	key.AsIsFormat
	Inner Cacher
}

func (CacheLogger) Close

func (c CacheLogger) Close()

func (CacheLogger) Delete

func (c CacheLogger) Delete(key string) error

func (CacheLogger) Get

func (c CacheLogger) Get(key string) ([]byte, error)

func (CacheLogger) Set

func (c CacheLogger) Set(key string, data []byte, expireIn time.Duration)

type Cacher

type Cacher interface {
	key.KeyFormatter
	Set(key string, data []byte, expireIn time.Duration)
	Get(key string) ([]byte, error)
	Delete(key string) error
	Close()
}

func NewCacheLogger

func NewCacheLogger(dir string, inner Cacher) Cacher

func NewCacher

func NewCacher(container ...string) (out Cacher)

Jump to

Keyboard shortcuts

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