# auto-fill-lru

> > A LRU cache with a provider function to auto-cache itens

Latest version **1.0.1** (published 2020-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install auto-fill-lru
pnpm add auto-fill-lru
yarn add auto-fill-lru
bun add auto-fill-lru
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-02-26 |
| First published | 2020-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 18 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | edgardleal |

## Links

- npm: https://www.npmjs.com/package/auto-fill-lru
- npm.io page: https://npm.io/package/auto-fill-lru

## Dependencies (1)

- [debug](https://npm.io/package/debug.md) ^4.1.1

## Recent versions

- 1.0.1 (latest) — 2020-02-26
- 1.0.0 — 2020-02-26

## README

# auto-fill-lru

> A LRU cache with a provider function to auto-cache itens

![Build CI](https://github.com/edgardleal/auto-fill-lru/workflows/Build%20CI/badge.svg)

## Installing

```
npm install auto-fill-lru
```

## Examples

```js

function slowFunction(key) {
  return new Promise((resolve) => {
    setTimeout(() => resolve(100), 1000);
  });
}

const instance = new LRU({
  retrieveFunction: slowFunction,
});

result = await intance.get('1'); // return after 1s

result2 = await instance.get('1'); // return imediatly
```

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