lru_store

package
v0.0.0-...-fdc8e6b Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LruStore

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

func NewLruStore

func NewLruStore(maxEntries int) (*LruStore, error)

func NewLruStoreWithEvict

func NewLruStoreWithEvict(maxEntries int, onEvicted func(key interface{}, value interface{})) (*LruStore, error)

func (*LruStore) Close

func (ls *LruStore) Close()

func (*LruStore) Flush

func (ls *LruStore) Flush() error

func (*LruStore) Insert

func (ls *LruStore) Insert(key string, value []byte) error

func (*LruStore) Len

func (ls *LruStore) Len() uint

func (*LruStore) Remove

func (ls *LruStore) Remove(key string) error

func (*LruStore) Retrieve

func (ls *LruStore) Retrieve(key string) ([]byte, error)

func (*LruStore) Size

func (ls *LruStore) Size() uint64

Jump to

Keyboard shortcuts

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