cache-promise-result
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i cache-promise-result

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

15 kB

Total Files

16

Last publish

Collaborators

  • miguelmota