lru

package
v0.0.0-...-35a4376 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LRUCache

type LRUCache[Key comparable, Value any] struct {
	// contains filtered or unexported fields
}

func NewLRUCache

func NewLRUCache[Key comparable, Value any](capacity int, ttl time.Duration) *LRUCache[Key, Value]

func (*LRUCache[Key, Value]) Get

func (c *LRUCache[Key, Value]) Get(key Key) (Value, bool)

func (*LRUCache[Key, Value]) Put

func (c *LRUCache[Key, Value]) Put(key Key, value Value)

func (*LRUCache[Key, Value]) Remove

func (c *LRUCache[Key, Value]) Remove(key Key)

Jump to

Keyboard shortcuts

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