# @specialblend/lru-cache-pipe

> functional wrapper around lru-cache

Latest version **0.2.0** (published 2020-06-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install @specialblend/lru-cache-pipe
pnpm add @specialblend/lru-cache-pipe
yarn add @specialblend/lru-cache-pipe
bun add @specialblend/lru-cache-pipe
```

## 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.2.0 |
| Published | 2020-06-28 |
| First published | 2019-07-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | cj@specialblend.net |
| Maintainers | __specialblend__ |
| Keywords | lru, cache, lru-cache, functional |

## Links

- npm: https://www.npmjs.com/package/@specialblend/lru-cache-pipe
- Repository: https://github.com/specialblend/lru-cache-pipe
- Homepage: https://github.com/specialblend/lru-cache-pipe#readme
- Issues: https://github.com/specialblend/lru-cache-pipe/issues
- npm.io page: https://npm.io/package/@specialblend/lru-cache-pipe

## Dependencies (2)

- [ramda](https://npm.io/package/ramda.md) ^0.26.1
- [@types/lru-cache](https://npm.io/package/@types/lru-cache.md) ^5.1.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2020-06-28
- 0.1.1 — 2020-01-29
- 0.1.0 — 2020-01-29
- 0.0.3 — 2020-01-28
- 0.0.2 — 2019-08-31
- 0.0.1 — 2019-07-12

## README

# @specialblend/lru-cache-pipe

functional wrapper around [lru-cache](https://github.com/isaacs/node-lru-cache)

## installation

`npm install @specialblend/lru-cache-pipe`

## usage

```javascript
import createCache from '@specialblend/lru-cache-pipe';

async function fetchTodoById (id) {
    // IO intensive operation ...
}

const todoCache = createCache(fetchTodoById)

async function main() {
    await todoCache.resolve('test-todo-id'); // => calls fetchTodoById with test-todo-id and caches the result

    await todoCache.resolve('test-todo-id'); // => returns the cached result

    await todoCache.resolve('fooBarId'); // => calls fetchTodoById with fooBarId and caches the result

    await todoCache.resolve('fooBarId'); // => returns the cached result
}

```

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