0.0.3 • Published 10 years ago
assoc-cache v0.0.3
assoc-cache
A simple local memory cache via an associative array support .set() .get()
Installation
npm install assoc-cacheUsage
var cache = require('assoc-cache');
// usage
cache.set('foo', 'bar');
cache.get('foo', function(value){console.log(value)});Which should print
barAPI
set function(key, value)
- stores a value
get function(key, callback)
- callback value or
undefined