Skip to content

Commit

Permalink
Remove caching packages (#6541)
Browse files Browse the repository at this point in the history
Remove apollo-server-caching, apollo-server-cache-redis, and
apollo-server-cache-memcached packages. We will continue to offer bugfixes for
these packages as needed but don't intend to continue active development on
them. Our recommendation going forward will be to use the keyv package along
with our KeyvAdapter from the @apollo/utils.keyvadapter package. Docs updates to
come in a following PR (but coupled with this release).

The KeyValueCache interface and InMemoryLRUCache wrapper around lru-cache (as
well as a few useful cache wrappers like PrefixingKeyValueCache) will continue
to exist in the @apollo/utils.keyvaluecache package. It's worth mentioning that
InMemoryLRUCache is on a newer major version of lru-cache which doesn't permit
the unbounded behavior which we've had by default. In AS 3.9 you can opt into
the bounded cache, and in AS4 it will be the default.
  • Loading branch information
trevor-scheer committed Jun 15, 2022
1 parent f66fddc commit 999adf5
Show file tree
Hide file tree
Showing 43 changed files with 11 additions and 1,202 deletions.
3 changes: 0 additions & 3 deletions .codesandbox/ci.json
Expand Up @@ -6,9 +6,6 @@
"packages/apollo-reporting-protobuf",
"packages/apollo-server",
"packages/apollo-server-azure-functions",
"packages/apollo-server-cache-memcached",
"packages/apollo-server-cache-redis",
"packages/apollo-server-caching",
"packages/apollo-server-cloud-functions",
"packages/apollo-server-cloudflare",
"packages/apollo-server-core",
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,7 @@ The version headers in this history reflect the versions of Apollo Server itself
- Remove internal dependency on `apollo-server-caching`, switch over to `@apollo/utils.keyvaluecache`. This PR specifically also introduces Keyv as an unbounded cache solution, but will replace with our own simple implementation in a follow-up PR targeting this minor version release. [PR #6522](https://github.com/apollographql/apollo-server/pull/6522)
- Remove dependency on `keyv`/`@apollo/utils.keyvadapter` in favor of a simple `Map`-backed cache which implements TTL [PR #6535](https://github.com/apollographql/apollo-server/pull/6535)
- Add `cache: "bounded"` configuration option, allowing users to opt into bounded request cache (recommended) [PR #6536](https://github.com/apollographql/apollo-server/pull/6536)
- Remove `apollo-server-caching` and `apollo-server-cache-*` packages [PR #6541](https://github.com/apollographql/apollo-server/pull/6541)

## v3.8.2

Expand Down

0 comments on commit 999adf5

Please sign in to comment.