memory

package
v0.0.0-...-05a1c04 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MIT Imports: 3 Imported by: 0

README

MemoryCache

The memory cache is used for testing. It's not currently available for production use.

Documentation

Index

Constants

View Source
const CacheType = "memory"

Variables

This section is empty.

Functions

func New

func New(_ dict.Dicter) (cache.Interface, error)

Types

type MemoryCache

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

test cacher, implements the cache.Interface

func (*MemoryCache) Get

func (mc *MemoryCache) Get(key *cache.Key) ([]byte, bool, error)

func (*MemoryCache) Purge

func (mc *MemoryCache) Purge(key *cache.Key) error

func (*MemoryCache) Set

func (mc *MemoryCache) Set(key *cache.Key, val []byte) error

Jump to

Keyboard shortcuts

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