Skip to content

fix: correct no-store and no-cache behavior for response cache#8948

Merged
carodewig merged 8 commits intodevfrom
caroline/router-1613/response-cache
Mar 3, 2026
Merged

fix: correct no-store and no-cache behavior for response cache#8948
carodewig merged 8 commits intodevfrom
caroline/router-1613/response-cache

Conversation

@carodewig
Copy link
Copy Markdown
Contributor

@carodewig carodewig commented Mar 3, 2026

Confusingly, no-store and no-cache have different meanings. Per RFC 9111:

  • no-store: allows serving response from cache, but prohibits storing response in cache
  • no-cache: prohibits serving response from cache, but allows storing response in cache
    (NB: no-cache actually prohibits serving response from cache without revalidation - but the router doesn't distinguish between lookup and revalidation)

The response caching plugin was incorrectly treating no-store as both 'no serving response from the cache' and 'no storing response in the cache.'

This PR fixes that behavior.


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Changeset is included for user-facing changes
  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Metrics and logs are added3 and documented
  • Tests added and passing4
    • Unit tests
    • Integration tests
    • Manual tests, as necessary

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. A lot of (if not most) features benefit from built-in observability and debug-level logs. Please read this guidance on metrics best-practices.

  4. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@carodewig carodewig requested a review from a team as a code owner March 3, 2026 15:57
@apollo-librarian
Copy link
Copy Markdown
Contributor

apollo-librarian bot commented Mar 3, 2026

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 1 changed, 0 removed
* graphos/routing/(latest)/configuration/envvars.mdx

Build ID: 12e7c00917907d23adc8425d
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/12e7c00917907d23adc8425d


✅ AI Style Review — No Changes Detected

No MDX files were changed in this pull request.

Review Log: View detailed log

This review is AI-generated. Please use common sense when accepting these suggestions, as they may not always be accurate or appropriate for your specific context.

@github-actions

This comment has been minimized.

@carodewig carodewig enabled auto-merge (squash) March 3, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants