No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
index.js
package-lock.json
package.json
readme.md
test.js

readme.md

LRU Cache

I was challenged recently to implement an LRU cache in javascript, and I got hung up on some of the details! This is me, thinking through the API design and implementation.

API

const myLRU = new LRU(1000)
myLRU.set("key", {value: 'some', object: 'stuff'})
myLRU.get("key")
> {value: 'some', object: 'stuff'}