cache

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MIT 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

NewLRU represent initiate lru cache with capacity

func (*LRU) Get

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

Get value from lru if not found, return nil

func (*LRU) Put

func (c *LRU) Put(key string, value any)

Put cache with key and value to lru

Jump to

Keyboard shortcuts

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