funcacher
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

funcacher

NPM version NPM downloads CircleCI codecov donate

Install

$ yarn add funcacher

Usage

const Funcacher = require('funcacher')

const cache = new Funcacher({
  ioredis = ioredis, // ioredis client with your config
  expires = 60 // cache expires
})

const result = await longSQLQuery()
// cache it
const cachedResult = await cache.get('cache-key', longSQLQuery)

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

funcacher © zcong1993, Released under the MIT License.
Authored and maintained by zcong1993 with help from contributors (list).

github.com/zcong1993 · GitHub @zcong1993

Readme

Keywords

none

Package Sidebar

Install

npm i funcacher

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

3.99 kB

Total Files

4

Last publish

Collaborators

  • zcong