local

package
v0.0.0-...-ab1965d Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 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 LFU

type LFU interface {
	Get(key string) (any, bool)
	Set(*tinylfu.Item)
	Del(key string)
}

type TinyLFU

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

func NewTinyLFU

func NewTinyLFU(size int, ttl time.Duration) *TinyLFU

func (*TinyLFU) Del

func (self *TinyLFU) Del(key string)

func (*TinyLFU) Get

func (self *TinyLFU) Get(key string) []byte

func (*TinyLFU) Set

func (self *TinyLFU) Set(key string, b []byte)

func (*TinyLFU) UseRandomizedTTL

func (self *TinyLFU) UseRandomizedTTL(offset time.Duration)

Jump to

Keyboard shortcuts

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