cache

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 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
}

LRU is a naive thread-safe LRU cache

func NewLRU

func NewLRU(doexpire bool) *LRU

func (*LRU) Flush added in v0.4.0

func (l *LRU) Flush()

func (*LRU) Get

func (l *LRU) Get(k string) (*models.Redir, bool)

func (*LRU) Len

func (l *LRU) Len() uint

func (*LRU) Put

func (l *LRU) Put(k string, v *models.Redir)

Jump to

Keyboard shortcuts

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