LRUCache

LRUCache

A simple LRU cache utility. Not meant for external usage.

Constructor

new LRUCache()

Methods

get(key)

Get an item from the cache.

Parameters:
Name Type Description
key

the key to retrieve

set(key, value)

Add an item to the cache.

Parameters:
Name Type Description
key

the key to upsert

value

the value of the key