lru

package
v2.16.21 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMaxSize  = errors.New("invalid max size, must be greater than 0")
	ErrInvalidMaxItems = errors.New("invalid max items, must be greater than 0")
)

Functions

This section is empty.

Types

type LruCache

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

func NewLruCache

func NewLruCache(maxBytes, maxItems uint64) (*LruCache, error)

func (*LruCache) Delete

func (c *LruCache) Delete(key string)

func (*LruCache) Get

func (c *LruCache) Get(key string) (res []byte, status bool)

func (*LruCache) Set

func (c *LruCache) Set(key string, resp []byte)

Jump to

Keyboard shortcuts

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