updated response caching docs and addressed discrepancies - #8794
Style Review Completed
The pull request has 3 style issues.
Duration: 665ms
PR URL: #8794
Review Comments: The AI has posted 3 inline comments with suggestions
Summary of changes:
This pull request refines the documentation for clarity and accuracy. It introduces reader-centric language, removes unnecessary transition words, and uses contractions for better readability. Additionally, it corrects the configuration path `subgraph.all.ttl` to `response_caching.subgraph.all`, clarifies `max-age` as a directive, and improves conditional statements with 'If'.
Annotations
Check notice on line 28 in docs/source/routing/performance/caching/response-caching/faq.mdx
apollo-librarian / AI Style Review
docs/source/routing/performance/caching/response-caching/faq.mdx#L28
Use reader-centric language ("your schema") and remove unnecessary transition words ("However", "As a result", "normally") for conciseness.
```suggestion
The router doesn't remove cache entries when you update your schema. If a schema change affects the queries sent to subgraphs, the router generates new cache keys for those queries. Old cache entries stop serving cache hits. They're effectively expired, although the data might still exist in storage until its TTL expires. Cache entries for unchanged query patterns remain available and continue to serve cache hits.
```
Check notice on line 66 in docs/source/routing/performance/caching/response-caching/faq.mdx
apollo-librarian / AI Style Review
docs/source/routing/performance/caching/response-caching/faq.mdx#L66
Use the contraction "doesn't" for negation to improve readability.
```suggestion
The router caches the entire response from each subgraph request as a single unit. When an operation queries multiple root fields from the same subgraph, the router caches the complete response (containing all root fields) under a single cache entry. Operations with overlapping root fields don't share cache entries. The router creates a unique entry for each subgraph request based on the full query sent to the subgraph. This behavior doesn't apply to entity requests.
```
Check warning on line 34 in docs/source/routing/performance/caching/response-caching/quickstart.mdx
apollo-librarian / AI Style Review
docs/source/routing/performance/caching/response-caching/quickstart.mdx#L34
The configuration path `subgraph.all.ttl` is incorrect; the setting is nested under `response_caching`. Refer to the `subgraph.all` section for accuracy. Additionally, `max-age` is a directive, and 'If' is clearer for conditional statements.
```suggestion
- Configure a TTL either globally in `subgraph.all` or for each subgraph. The router requires a configured TTL to start. This TTL serves as a fallback. If a subgraph response includes a `Cache-Control` header with a `max-age` directive, that value takes precedence.
```