# @type-cacheable/lru-cache-adapter

> Adapter for using lru-cache with type-cacheable

Latest version **18.0.3** (published 2026-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @type-cacheable/lru-cache-adapter
pnpm add @type-cacheable/lru-cache-adapter
yarn add @type-cacheable/lru-cache-adapter
bun add @type-cacheable/lru-cache-adapter
```

## Health

**Score 60/100 (C)** — status: stable.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 18.0.3 |
| Published | 2026-03-12 |
| First published | 2020-08-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 191 |
| Author | Joshua Slate |
| Maintainers | joshuaslate |
| Keywords | cache, typescript, lru-cache |

## Links

- npm: https://www.npmjs.com/package/@type-cacheable/lru-cache-adapter
- Repository: https://github.com/joshuaslate/type-cacheable
- Homepage: https://github.com/joshuaslate/type-cacheable#readme
- Issues: https://github.com/joshuaslate/type-cacheable/issues
- npm.io page: https://npm.io/package/@type-cacheable/lru-cache-adapter

## 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

- 18.0.3 (latest) — 2026-03-12
- 18.0.2 — 2025-09-11
- 18.0.1 — 2025-09-11
- 18.0.0 — 2024-08-21
- 17.0.1 — 2024-02-20
- 17.0.0 — 2024-02-16
- 16.1.0 — 2024-02-15
- 16.0.1 — 2023-09-11
- 16.0.0 — 2023-09-11
- 15.0.0 — 2023-08-15
- 14.0.1 — 2023-05-08
- 14.0.0 — 2023-04-24
- 13.0.0 — 2023-03-23
- 12.1.0 — 2023-03-23
- 12.0.2 — 2022-11-22
- … 19 more at https://npm.io/package/@type-cacheable/lru-cache-adapter/versions

## README

# @type-cacheable/lru-cache-adapter

[![npm downloads](https://img.shields.io/npm/dm/@type-cacheable/lru-cache-adapter)](https://www.npmjs.com/package/@type-cacheable/lru-cache-adapter)

TypeScript-based caching decorators to assist with caching (and clearing cache for) async methods. This package supports the `lru-cache` client.

[View full documentation](https://github.com/joshuaslate/type-cacheable)

## Usage

### Installation

```bash
npm install --save @type-cacheable/core @type-cacheable/lru-cache-adapter
```

or

```bash
yarn add @type-cacheable/core @type-cacheable/lru-cache-adapter
```

### Using adapter

```ts
import { LRUCache } from 'lru-cache';
import { useAdapter } from '@type-cacheable/lru-cache-adapter';

const client = new LRUCache<string, any>();
const clientAdapter = useAdapter(client);
```

Then you can rely on the `@Cacheable`, `@CacheUpdate`, and `@CacheClear` decorators from `@type-cacheable/core`. [See core documentation](https://github.com/joshuaslate/type-cacheable/tree/main/packages/core)

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