cache

package
v0.0.0-...-2e345a2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: MIT Imports: 9 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	Logger log.Logger
}

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