Package Exports
- fast-memory-cache
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fast-memory-cache) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fast-memory-cache 
Simple in-memory cache implementation for Node.js
Installation
npm install --save fast-memory-cacheUsage example
var MemoryCache = require('fast-memory-cache');
// Create cache
var cache = new MemoryCache();
// Get/set value
var val = cache.get('key'); // undefined
cache.set('key', 'value');
val = cache.get('key'); // 'value'
// Delete value
cache.delete('key');
val = cache.get('key'); // undefined
// Set value which will expire after 1 second
cache.set('key', 'new-value', 1);
setTimeout(function () {
val = cache.get('key'); // undefined
}, 2000);Running tests
npm install
npm test