kash

Fast and efficient in-memory caching.

KASH

Benchmarks run on an early 2013 Macbook Pro: 2.7 GHz Intel Core i7, and 16 GB 1600 MHz DDR3

Using npm:

$ npm [-g] install kash

In Node.js:

var kash = require("kash");
setTimeout(function() {
  console.log(kash.get('foo'));
}, 101);
 
kash.set('foo', 'bar', 100);
 
console.log(kash.get('foo'));

Will print the following in the console:

bar
null

Set a key with a value. Set expires to remove from cache after specified number of milliseconds. Defaults to 2000 ms.

Retrieve the value for the specified key. Returns null if key does not exist.

Deletes a key.

Removes the cache of all contents.

Get the number of entries in the cache.

Matthew Hudson