cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

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

Errors

Functions

This section is empty.

Types

type InMemory

type InMemory struct {
	// contains filtered or unexported fields
}

func NewInMemory

func NewInMemory() *InMemory

func (*InMemory) Get

func (c *InMemory) Get(key string) (interface{}, error)

func (*InMemory) Set

func (c *InMemory) Set(key string, value interface{}) error

func (*InMemory) WithExpiration

func (c *InMemory) WithExpiration(d time.Duration) *InMemory

type Interface

type Interface interface {
	Get(key string) (interface{}, error)
	Set(key string, value interface{}) error
}

Jump to

Keyboard shortcuts

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