0.0.1 • Published 3 years ago

cache-promise-result v0.0.1

Weekly downloads
25
License
MIT
Repository
github
Last release
3 years ago

cache-promise-result

A wrapper for Promises to cache results for a duration of time.

Install

npm install cache-promise-result

Getting 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

License

MIT