memoiz
Node.js / javascript module to cache method's return value
Installation
npm install --save memoiz
Usage
var Memoiz = ; var sum = Memoizmethod { return a + b;}; // First run will trigger a cache set; // 3 // Second run will trigger a cache get// without running provided method; // 3
Future features
In the future we should add:
- Abillity to detect uniqueness on arguments to cache specific responses (at the time it is caching only one result);
- Different kinds of stores;