Skip to content
Simple and Fast LRU cache for node
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benckmark
lib fix mistake May 10, 2016
test - Add del function Jan 11, 2013
.gitignore
.travis.yml
LICENSE
Makefile
README.md
index.js - Add benchmarks Jan 11, 2013
package.json Change repository Mar 31, 2015

README.md

node-simple-lru-cache

Build Status

It's a very simple and extremely fast lru cache for node.js.

This cache will priorize the lastest used keys over the least used keys, so when a new key is added if the cache is full, the least used key will be removed

Instalation

npm install simple-lru-cache

Usage

var SimpleCache = require("simple-lru-cache")

var cache = new SimpleCache({"maxSize":1000})

//Add an Objet
cache.set("hello","world")

//Get an Object
cache.get("hello")

//Delete an Object
cache.del("hello")

//Reset cache
cache.reset()

Tests

npm install
npm test

Benchmark against lru-cache

  make bench
You can’t perform that action at this time.