Skip to content

fix: cache responses without public directive - #1658

Draft
fiam wants to merge 1 commit into
masterfrom
alberto/eng-9971-cache-without-public
Draft

fix: cache responses without public directive#1658
fiam wants to merge 1 commit into
masterfrom
alberto/eng-9971-cache-without-public

Conversation

@fiam

@fiam fiam commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai summary

Summary

  • Cache responses with a positive max-age or s-maxage even when public is absent.
  • Apply the configured fallback TTL when a response supplies recognized caching intent without an explicit freshness lifetime.
  • Keep missing, empty, and extension-only Cache-Control headers from opting responses into caching.
  • Preserve no-store, no-cache, private, invalid, and zero-TTL safeguards.
  • Expand unit, parser, and resolver-level coverage for cache-control behavior and precedence.

RFC 9111 section 5.2.2.9 states that public is unnecessary when a response is already cacheable: https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.9

Linear: https://linear.app/wundergraph/issue/ENG-9971/when-public-is-not-present-we-should-still-not-skip-caching

Testing

  • go test ./...
  • go test -race ./pkg/caching ./pkg/engine/cache

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.

Open Source AI Manifesto

This project follows the principles of the Open Source AI Manifesto.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@fiam
fiam force-pushed the alberto/eng-9971-cache-without-public branch 2 times, most recently from eb06268 to 7463c1a Compare September 3, 2026 22:32
@fiam
fiam force-pushed the alberto/eng-9971-cache-without-public branch from 7463c1a to 1ec78f3 Compare September 3, 2026 22:41
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.

1 participant