Memoize the results of async functions
$ component install segmentio/memoize-async
var memoize = require('..');
User.get = memoize(User.get);
User.get('[email protected]', function (err, user) {
// do some stuff
});
// ... later we will immediately get the user
User.get('[email protected]', function (err, user) {
});
MIT