nila-cache

1.0.0 • Public • Published

Nila in memory cache

Installation

npm install nila-cache --save

Usage

const cache = require('nila-cache');

// now just use the cache

cache.store('name', 'sivabharathy');
console.log(cache.get('foo'));

// that wasn't too interesting, here's the good part
cache.store('houdini', 'disappear', 100, function(key, value) {
    console.log(key + ' did ' + value);
}); // Time in ms

// create new cache instance
const newCache = new cache.NilaCache();

newCache.store('name', 'gotocva');

setTimeout(function() {
  console.log('name in old cache is ' + cache.get('foo'));
  console.log('name in new cache is ' + newCache.get('foo'));
}, 200);

Package Sidebar

Install

npm i nila-cache

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

5.43 kB

Total Files

3

Last publish

Collaborators

  • gotocva