cache

package
v0.0.0-...-eb64f0e Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultMaxEntries is the default max value of cache size.
	DefaultMaxEntries = 2048

	// ErrNotExists means record not exists in cache.
	ErrNotExists = errors.New("cache: not exists")
)

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Put(key, value interface{}) error
	Get(key interface{}) (interface{}, error)
	Invalidate(key interface{})
	Size() int
	Close()
}

Cache defines the minimum behavior of a cache instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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