From d443f5a6bffd05e502b2210a876474ca24da9382 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Mon, 13 Jan 2025 10:14:47 +0200 Subject: [PATCH] docs: Remove experimental "Schema aware query hashing" (#6535) --- .../routing/performance/caching/in-memory.mdx | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/docs/source/routing/performance/caching/in-memory.mdx b/docs/source/routing/performance/caching/in-memory.mdx index fbadf23a4d..159539e6b6 100644 --- a/docs/source/routing/performance/caching/in-memory.mdx +++ b/docs/source/routing/performance/caching/in-memory.mdx @@ -40,7 +40,7 @@ supergraph: ### Cache warm-up -When loading a new schema, a query plan might change for some queries, so cached query plans cannot be reused. +When loading a new schema, a query plan might change for some queries, so cached query plans cannot be reused. To prevent increased latency upon query plan cache invalidation, the router precomputes query plans for the most used queries from the cache when a new schema is loaded. @@ -80,19 +80,6 @@ then look at `apollo_router_schema_loading_time` and `apollo.router.query_planni 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 can use that key during warm up to check if a cached entry can be reused instead of planning it again. - -It can be activated through this option: - -```yaml title="router.yaml" -supergraph: - query_planning: - warmed_up_queries: 100 - experimental_reuse_query_plans: true -``` - ## 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.