lru

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 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 LRU

type LRU struct {
	// contains filtered or unexported fields
}

func New

func New(maxBytes int) *LRU

func (*LRU) Get

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

func (*LRU) Len

func (l *LRU) Len() int

func (*LRU) Range

func (l *LRU) Range(fn func(key string, val []byte) bool)

func (*LRU) Set

func (l *LRU) Set(ctx context.Context, key string, val []byte) error

func (*LRU) Size

func (l *LRU) Size() int

Jump to

Keyboard shortcuts

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