memory

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

type Memory struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Memory is an implementation of cache.Cacher

func New

func New() *Memory

New return new memory cache.

func (*Memory) Delete

func (m *Memory) Delete(ctx context.Context, key string) error

Delete a value

func (*Memory) Get

func (m *Memory) Get(ctx context.Context, key string) ([]byte, error)

Get a value

func (*Memory) Set

func (m *Memory) Set(ctx context.Context, key string, val []byte, opts ...cache.SetOption) error

Set a value

Jump to

Keyboard shortcuts

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