Skip to content

Integrate Cloud response caching with CMS cache-control policy - #214

Draft
timkelty wants to merge 1 commit into
5.xfrom
cache-control-model
Draft

timkelty wants to merge 1 commit into
5.xfrom
cache-control-model

Conversation

@timkelty

Copy link
Copy Markdown
Contributor

Description

Craft 6 centralizes response cache policy and dependency collection. This adds the Cloud consumer so Cloudflare receives that policy without duplicating collection or weakening restrictions.

  • Translate the Symfony policy into Cache-Control and CDN-Cache-Control, preserving browser/shared lifetimes, restrictions, stale directives, and revalidation. Apply Cloud defaults before dependency-expiry caps.
  • Retain Cloud tag encoding, header limits, ESI header handling, and batched invalidation through the signed Cloud gateway. Keep cookie eligibility in Cloud and log the common policy reasons.
  • Register automatically through the existing Craft middleware group, without a new cache backend or host-app setup.

Blocked on craftcms/cms#20545, which is still open. CI loads its full source at b439591 over existing locked dependencies; the Composer CMS requirement remains ^6. Update the minimum CMS version and lockfile once the contract is released. No existing package versions are upgraded here.

References: Symfony HTTP caching and Response cache methods.

Consume the CMS checkpoint for browser/CDN policy and dependency tags, apply Cloud defaults before expiry caps, and preserve gateway tag invalidation.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1c3c7-9d57-7547-959b-ebaf6c0cd15c
Co-authored-by: Amp <amp@ampcode.com>
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