lru

package
v0.0.0-...-5801db9 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LRU

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

func NewLRU

func NewLRU(capacity int) (lru *LRU)

func (*LRU) Get

func (lru *LRU) Get(key string) any

func (*LRU) Put

func (lru *LRU) Put(key string, val any)

type Node

type Node struct {
	Key   string
	Value any
	Prev  *Node
	Next  *Node
}

Jump to

Keyboard shortcuts

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