# @extra-memoize/extra-disk-cache

> The adapter for [extra-disk-cache].

Latest version **0.9.3** (published 2026-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @extra-memoize/extra-disk-cache
pnpm add @extra-memoize/extra-disk-cache
yarn add @extra-memoize/extra-disk-cache
bun add @extra-memoize/extra-disk-cache
```

## Health

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

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.9.3 |
| Published | 2026-03-01 |
| First published | 2022-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 1 |
| Unpacked size | 19.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | BlackGlory |
| Maintainers | black_glory |

## Links

- npm: https://www.npmjs.com/package/@extra-memoize/extra-disk-cache
- Repository: https://github.com/extra-memoize/extra-disk-cache
- Homepage: https://github.com/extra-memoize/extra-disk-cache#readme
- Issues: https://github.com/extra-memoize/extra-disk-cache/issues
- npm.io page: https://npm.io/package/@extra-memoize/extra-disk-cache

## Dependencies (1)

- [@blackglory/prelude](https://npm.io/package/@blackglory/prelude.md) ^0.4.0

## Recent versions

- 0.9.3 (latest) — 2026-03-01
- 0.9.2 — 2026-02-12
- 0.9.1 — 2026-02-12
- 0.9.0 — 2025-07-04
- 0.8.4 — 2025-05-25
- 0.8.3 — 2024-12-16
- 0.8.2 — 2023-03-05
- 0.8.1 — 2022-12-21
- 0.8.0 — 2022-12-12
- 0.7.0 — 2022-11-25
- 0.6.5 — 2022-11-23
- 0.6.4 — 2022-09-09
- 0.6.3 — 2022-08-04
- 0.6.2 — 2022-08-02
- 0.6.1 — 2022-08-01
- … 8 more at https://npm.io/package/@extra-memoize/extra-disk-cache/versions

## README

# @extra-memoize/extra-disk-cache
The adapter for [extra-disk-cache].

[extra-disk-cache]: https://www.npmjs.com/package/extra-disk-cache

## Install
```sh
npm install --save @extra-memoize/extra-disk-cache
# or
yarn add @extra-memoize/extra-disk-cache
```

### API
#### DiskCache
```ts
class DiskCache<T> implements ICache<T> {
  constructor(
    view: DiskCacheView<string, T>
  , timeToLive?: number
  )
}
```

#### StaleWhileRevalidateDiskCache
```ts
class StaleWhileRevalidateDiskCache<T> implements IStaleWhileRevalidateCache<T> {
  constructor(
    view: DiskCacheView<string, T>
  , timeToLive: number
  , staleWhileRevalidate: number
  )
}
```

#### StaleIfErrorDiskCache
```ts
class StaleIfErrorDiskCache<T> implements IStaleIfErrorCache<T> {
  constructor(
    view: DiskCacheView<string, T>
  , timeToLive: number
  , staleIfError: number
  )
}
```

#### StaleWhileRevalidateAndStaleIfErrorDiskCache
```ts
class StaleWhileRevalidateAndStaleIfErrorDiskCache<T> implements IStaleWhileRevalidateAndStaleIfErrorCache<T> {
  constructor(
    view: DiskCacheView<string, T>
  , timeToLive: number
  , staleWhileRevalidate: number
  , staleIfError: number
  )
}
```

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