# @apollo/server-plugin-response-cache

> Apollo Server full query response cache

Latest version **5.0.0** (published 2025-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @apollo/server-plugin-response-cache
pnpm add @apollo/server-plugin-response-cache
yarn add @apollo/server-plugin-response-cache
bun add @apollo/server-plugin-response-cache
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 5.0.0 |
| Published | 2025-07-17 |
| First published | 2022-07-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 2 |
| Unpacked size | 200.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13954 |
| Author | Apollo |
| Maintainers | trevor.scheer, glasser, dkuc, apollo-bot |

## Links

- npm: https://www.npmjs.com/package/@apollo/server-plugin-response-cache
- Repository: https://github.com/apollographql/apollo-server
- Homepage: https://github.com/apollographql/apollo-server#readme
- Issues: https://github.com/apollographql/apollo-server/issues
- npm.io page: https://npm.io/package/@apollo/server-plugin-response-cache

## Dependencies (2)

- [@apollo/utils.createhash](https://npm.io/package/@apollo/utils.createhash.md) ^3.0.0
- [@apollo/utils.keyvaluecache](https://npm.io/package/@apollo/utils.keyvaluecache.md) ^4.0.0

## Recent versions

- 5.0.0 (latest) — 2025-07-17
- 5.0.1-rc.0 (rc) — 2025-10-21
- 4.1.5-alpha.0 (alpha) — 2025-06-02
- 5.0.0-rc.0 — 2025-07-07
- 4.1.4 — 2025-01-03
- 4.1.3 — 2023-06-26
- 4.1.2 — 2023-04-03
- 4.1.1 — 2023-03-15
- 4.1.0 — 2022-12-12
- 4.0.3 — 2022-11-23
- 4.0.2 — 2022-11-23
- 4.0.1 — 2022-10-17
- 4.0.0 — 2022-10-10
- 4.0.0-rc.6 — 2022-09-27
- 4.0.0-alpha.5 — 2022-09-24
- … 5 more at https://npm.io/package/@apollo/server-plugin-response-cache/versions

## README

# Response Cache plugin

This Apollo Server response cache plugin implements a full GraphQL query response cache.

- Add the plugin to your ApolloServer's plugins list
- Set `@cacheControl` hints on your schema or call `info.cacheControl.setCacheHint` in your resolvers
- If the entire GraphQL response is covered by cache hints with non-zero maxAge,
  the whole response will be cached.

This cache is a full query cache: cached responses are only used for identical requests.


See [the docs](https://www.apollographql.com/docs/apollo-server/performance/caching/) for details.

---
_Source: https://npm.io/package/@apollo/server-plugin-response-cache · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
