cache-promise-result
v0.0.1
Published
A wrapper for Promises to cache results for a duration of time.
Readme
cache-promise-result
A wrapper for Promises to cache results for a duration of time.
Install
npm install cache-promise-resultGetting Started
const cachePromise = require('cache-promise-result')
// cache myPromise result for 60 seconds
const result = await cachePromise(myPromise, 60 * 1000)
console.log(result)Test
npm test