cache

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: Apache-2.0 Imports: 1 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
}

Lru object

func NewLru

func NewLru() *Lru

NewLru cache

func (*Lru) Add

func (l *Lru) Add(key, value interface{}) bool

Add key and value to lru

func (*Lru) Get

func (l *Lru) Get(key interface{}) (interface{}, bool)

Get return value by key

func (*Lru) Len

func (l *Lru) Len() int

Len return cache size

Jump to

Keyboard shortcuts

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