function-cacheify

1.1.3 • Public • Published

memoize function as async cache

Install

npm install function-cacheify

Usage

const proxy = require('function-cacheify')
const slowQuery = (x) => x

const opts = {
  'max': 1000,
  'maxAge': 1000 * 60 * 60 * 4 } // default

const quickQuery = proxy(slowQuery, opts)

quickQuery(1)

Package Sidebar

Install

npm i function-cacheify

Weekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

2.51 kB

Total Files

3

Last publish

Collaborators

  • hokang