lrucache

package
v0.155.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Scheme = "lrucache"

Variables

View Source
var ErrInitializationFailed = errors.New(fmt.Sprintf("%s: failed to initialize", Scheme))

Functions

This section is empty.

Types

type Cache

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

func New

func New(size int) (*Cache, error)

func NewFromURL

func NewFromURL(url *url.URL) (*Cache, error)

func (*Cache) Delete

func (cache *Cache) Delete(key string) error

func (*Cache) Get

func (cache *Cache) Get(key string) ([]byte, error)

func (*Cache) Set

func (cache *Cache) Set(key string, value []byte) error

Jump to

Keyboard shortcuts

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