Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed Apr 3, 2024
1 parent 6ac2e8b commit 1912fec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/source/configuration/in-memory-caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ then look at `apollo_router_schema_loading_time` and `apollo_router_query_planni
#### Cache warm-up with distributed caching

If the Router is using distributed caching for query plans, the warm-up phase will also store the new query plans in Redis. Since all Router instances might have the same distributions of queries in their in-memory cache, the list of queries is shuffled before warm-up, so each Router instance can plan queries in a different order and share their results through the cache.

#### Schema aware query hashing

The query plan cache key uses a hashing algorithm specifically designed for GraphQL queries, using the schema. If a schema update does not affect a query (example: a field was added), then the query hash will stay the same. The query plan cache uses that key during warm up to check if a cached entry can be reused instead of planning it again.

## Caching automatic persisted queries (APQ)

[Automatic Persisted Queries (**APQ**)](/apollo-server/performance/apq/) enable GraphQL clients to send a server the _hash_ of their query string, _instead of_ sending the query string itself. When query strings are very large, this can significantly reduce network usage.
Expand Down

0 comments on commit 1912fec

Please sign in to comment.