memory

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package memory implements the cache.Interface and registers an in-memory provider. All operations are using a sync.RWMutex for synchronization. Benchmark file is available.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrKeyNotExist = errors.New("cache/memory: key %v does not exist")
)

Error messages

Functions

func New

func New(opt interface{}) cm.Interface

New creates a in-memory cache by the given options.

Types

type Options

type Options struct {
	GCInterval time.Duration
}

Options for the in-memory provider

Jump to

Keyboard shortcuts

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