LRUCache

package
v0.0.0-...-a4d355c Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: GPL-3.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 Key

type Key interface{}

a key can be any value

type LRUCache

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

func New

func New(capacity int) *LRUCache

New creates a new LRUCache

func (*LRUCache) Get

func (c *LRUCache) Get(key Key) (interface{}, bool)

Get look up a keys value from LRUCache

func (*LRUCache) Set

func (c *LRUCache) Set(key Key, value interface{}) bool

Set creates a value in LRUCache

Jump to

Keyboard shortcuts

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