# funcacher

> Function value cacher by redis

Latest version **0.1.2** (published 2018-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install funcacher
pnpm add funcacher
yarn add funcacher
bun add funcacher
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2018-02-28 |
| First published | 2018-02-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zcong1993 |
| Maintainers | zcong |

## Links

- npm: https://www.npmjs.com/package/funcacher
- Repository: https://github.com/zcong1993/funcacher
- Homepage: https://github.com/zcong1993/funcacher#readme
- Issues: https://github.com/zcong1993/funcacher/issues
- npm.io page: https://npm.io/package/funcacher

## Dependencies (1)

- [ioredis](https://npm.io/package/ioredis.md) ^3.2.2

## Recent versions

- 0.1.2 (latest) — 2018-02-28
- 0.1.1 — 2018-02-27
- 0.1.0 — 2018-02-27

## README

# funcacher

[![NPM version](https://img.shields.io/npm/v/funcacher.svg?style=flat)](https://npmjs.com/package/funcacher) [![NPM downloads](https://img.shields.io/npm/dm/funcacher.svg?style=flat)](https://npmjs.com/package/funcacher) [![CircleCI](https://circleci.com/gh/zcong1993/funcacher/tree/master.svg?style=shield)](https://circleci.com/gh/zcong1993/funcacher/tree/master) [![codecov](https://codecov.io/gh/zcong1993/funcacher/branch/master/graph/badge.svg)](https://codecov.io/gh/zcong1993/funcacher)
[![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/zcong1993/donate)

## Install

```bash
$ yarn add funcacher
```

## Usage

```js
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](https://github.com/zcong1993), Released under the [MIT](./LICENSE) License.<br>
Authored and maintained by zcong1993 with help from contributors ([list](https://github.com/zcong1993/funcacher/contributors)).

> [github.com/zcong1993](https://github.com/zcong1993) · GitHub [@zcong1993](https://github.com/zcong1993)

---
_Source: https://npm.io/package/funcacher · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
