lru

package
v0.0.0-...-1858810 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: BSD-3-Clause Imports: 5 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 {
	WithTTL bool
	// contains filtered or unexported fields
}

func New

func New(log *logrus.Logger, size int, ttl *time.Duration) (*LRU, error)

func (*LRU) Create

func (l *LRU) Create(key, value string) error

func (*LRU) Delete

func (l *LRU) Delete(key string) error

func (*LRU) Get

func (l *LRU) Get(key string) (string, error)

func (*LRU) Update

func (l *LRU) Update(key, value string) error

Jump to

Keyboard shortcuts

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