lru

package
v1.4.21 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: GPL-3.0 Imports: 2 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 NewLRU

func NewLRU(maxLen int) *LRU

func (*LRU) Del

func (lc *LRU) Del(k interface{})

func (*LRU) Get

func (lc *LRU) Get(k interface{}) (interface{}, bool)

func (*LRU) Len

func (lc *LRU) Len() int

func (*LRU) PopTail

func (lc *LRU) PopTail() (interface{}, bool)

func (*LRU) PushFront

func (lc *LRU) PushFront(k, v interface{})

type SafeLRU

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

func NewSafeLRU

func NewSafeLRU(maxLen int) *SafeLRU

func (*SafeLRU) Del

func (lc *SafeLRU) Del(k interface{})

func (*SafeLRU) Get

func (lc *SafeLRU) Get(k interface{}) (interface{}, bool)

func (*SafeLRU) Len

func (lc *SafeLRU) Len() int

func (*SafeLRU) PopTail

func (lc *SafeLRU) PopTail() (interface{}, bool)

func (*SafeLRU) PushFront

func (lc *SafeLRU) PushFront(k, v interface{})

Jump to

Keyboard shortcuts

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