An open API service indexing awesome lists of open source software.

https://github.com/mscdex/lrused

An LRU cache for node.js
https://github.com/mscdex/lrused

Last synced: over 1 year ago
JSON representation

An LRU cache for node.js

Awesome Lists containing this project

README

          

# Description

A simple and efficient LRU cache for [node.js](http://nodejs.org/).

## Installation

npm install lrused

## API

* **(constructor)**(< _integer_ >capacity) - Creates and returns a new LRU cache instance with the given maximum capacity.

* **get**(< _mixed_ >key) - _mixed_ - Returns the cached data identified by `key` and refreshes the cache entry.

* **set**(< _mixed_ >key, < _mixed_ >value) - _(void)_ - Adds or updates and refreshes the cache entry identified by `key` with the given `value`.