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
NodeJs fast memory cache implementation.
Installation
npm install fast-memory-cache --saveUsage example
var MemoryCache = require('fast-memory-cache');
var cache = new MemoryCache();
var val = cache.get('key'); // undefined
cache.set('key', 'value', 1000);
val = cache.get('key'); // 'value'
cache.delete('key');
val = cache.get('key'); // undefined
cache.set('key', 'new-value', 1000);
setTimeout(function() {
val = cache.get('key'); // undefined
}, 2000);