lru

package
v0.0.0-...-b97aeb0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key interface{}

type LRU

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

func NewLRU

func NewLRU(maxEntries int) *LRU

func (*LRU) Add

func (l *LRU) Add(key Key, value interface{})

func (*LRU) Get

func (l *LRU) Get(key Key) (value interface{}, ok bool)

func (*LRU) Remove

func (l *LRU) Remove(key Key)

func (*LRU) RemoveOldest

func (l *LRU) RemoveOldest()

Jump to

Keyboard shortcuts

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