# cachecache

> Connect middleware that preemptively 304s

Latest version **1.0.3** (published 2018-11-05) · ISC license · 0 weekly downloads

## Install

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

## 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.3 |
| Published | 2018-11-05 |
| First published | 2014-11-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Seth Fitzsimmons |
| Maintainers | mojodna |

## Links

- npm: https://www.npmjs.com/package/cachecache
- Repository: https://github.com/mojodna/node-cachecache
- Homepage: https://github.com/mojodna/node-cachecache#readme
- Issues: https://github.com/mojodna/node-cachecache/issues
- npm.io page: https://npm.io/package/cachecache

## Dependencies (2)

- [fresh](https://npm.io/package/fresh.md) ^0.5.2
- [lru-cache](https://npm.io/package/lru-cache.md) ^2.5.0

## Recent versions

- 1.0.3 (latest) — 2018-11-05
- 1.0.2 — 2016-02-17
- 1.0.1 — 2014-11-05
- 1.0.0 — 2014-11-05

## README

# cachecache

Connect middleware to preemptively handle requests containing `If-None-Match`
and `If-Modified-Since` headers.

By default, Express _will_ return 304s for dynamic content, but only after it
has been regenerated. This caches response headers (but not bodies) to allow
304s to be sent without potentially-costly content regeneration.

## Usage

```bash
npm install --save cachecache
```

```javascript
var app = require("express")();

app.use(require("cachecache")({
  max: 1000000 // maximum number of entries in the underlying LRU cache;
               // default value
});

// ...
```

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