memory

package
v1.0.1-0...-4a73120 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package memory providers in-memory cache containers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container byte

Container represents a memory cache container that implemented in another package.

const (
	// FIFO represents a memory container using replacement algorithm using FIFO (first in first out).
	FIFO Container = iota + 1

	// LFU represents a memory container using replacement algorithm using LFU (least frequently used).
	LFU

	// LRU represents a memory container using replacement algorithm using LRU (least recently used).
	LRU

	// MRU represents a memory container using replacement algorithm using MRU (most recently used).
	MRU

	// ARC represents a memory container using replacement algorithm using ARC (adaptive/adjustable replacement cache).
	ARC
)

Memory Containers.

func (Container) Available

func (c Container) Available() bool

Available reports whether the given container is linked into the binary.

func (Container) NewContainer

func (c Container) NewContainer(capacity int) caching.Container

NewContainer returns a new memory container.

func (Container) Register

func (c Container) Register(function func(int) caching.Container)

Register registers the container container. This is intended to be called from the init function in packages that implement container functions.

Directories

Path Synopsis
Package arc providers an in-memory cache container using ARC (adaptive/adjustable replacement cache) arithmetic.
Package arc providers an in-memory cache container using ARC (adaptive/adjustable replacement cache) arithmetic.
Package fifo providers an in-memory cache container using FIFO (first in first out) arithmetic.
Package fifo providers an in-memory cache container using FIFO (first in first out) arithmetic.
Package lfu providers an in-memory cache container using LFU (least frequently used) arithmetic.
Package lfu providers an in-memory cache container using LFU (least frequently used) arithmetic.
Package lru providers an in-memory cache Container using LRU (least recently used) arithmetic.
Package lru providers an in-memory cache Container using LRU (least recently used) arithmetic.
Package mru providers an in-memory cache Container using MRU (most recently used) arithmetic.
Package mru providers an in-memory cache Container using MRU (most recently used) arithmetic.

Jump to

Keyboard shortcuts

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