memory

package
v5.0.0-...-03972fd Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Lock key
	Lock(key string)
	// Unlock key
	Unlock(key string)

	// Get value by key. Returns data.ErrNoMatch, if has no key.
	Get(key string, dst interface{}) error
	// Set value with key and expire time.
	Set(key string, val interface{}, timeout time.Duration) error
	// Delete cached value by key.
	Delete(key string) error

	// Assert depended key
	Assert(key string, dependencies map[string]string) error
	// Invalidate dependencies
	Invalidate(key, val string) error
}

func New

func New(
	arbiter arbiter.Arbiter,
	cache cache.Cache,
) Manager

Jump to

Keyboard shortcuts

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