cache

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm string

Algorithm is the string type for caching algorithms labels.

const (
	// LRU is the constant for Least Recently Used.
	LRU Algorithm = "LRU"

	// MRU is the constant for Most Recently Used.
	MRU Algorithm = "MRU"

	// LFU is the constant for Least Frequently Used.
	LFU Algorithm = "LFU"

	// MFU is the constant for Most Frequently Used.
	MFU Algorithm = "MFU"
)

type LRUAlgo

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

func NewLRU

func NewLRU(cfg config.Config) *LRUAlgo

func (*LRUAlgo) Del

func (c *LRUAlgo) Del(req *model.Request)

func (*LRUAlgo) Get

func (c *LRUAlgo) Get(ctx context.Context, req *model.Request, fn model.ResponseCreator) (resp *model.Response, isHit bool, err error)

type OrderedList

type OrderedList struct {
	*list.List
	// contains filtered or unexported fields
}

func NewOrderedList

func NewOrderedList() *OrderedList

func (*OrderedList) Size

func (l *OrderedList) Size() uintptr

Jump to

Keyboard shortcuts

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