cache

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Getter
	Putter
	Deleter
}

Cache groups Getter, Putter and Deleter.

type Deleter

type Deleter interface {
	Delete(key interface{}) error
}

Deleter wraps a method to delete from cache.

type Getter

type Getter interface {
	Get(key interface{}) (interface{}, error)
}

Getter wraps a method to read from cache.

func MultiGetter

func MultiGetter(getters ...Getter) Getter

MultiGetter combines a lit of getters into a single getter.

type Putter

type Putter interface {
	Put(key interface{}, value interface{}) error
}

Putter wraps a method to write to cache.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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