tinylfu

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tinylfu is an implementation of the TinyLFU caching algorithm

http://arxiv.org/abs/1512.00727

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func New

func New[K comparable, V any](size int, samples int) *T[K, V]

func (*T[K, V]) Add

func (t *T[K, V]) Add(key K, val V)

func (*T[K, V]) Get

func (t *T[K, V]) Get(key K) (V, bool)

Directories

Path Synopsis
internal
list
Package list implements a doubly linked list.
Package list implements a doubly linked list.

Jump to

Keyboard shortcuts

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