Repository navigation
Conversation
Ports 3.x's signed Cloudflare transform URLs to Craft 6's asset transform driver registry, and registers a craftCloud transformer profile that becomes the default on Cloud. Amp-Thread-ID: https://ampcode.com/threads/T-01a1b2a5-ffcf-7312-966f-7e8624cf8b79 Co-authored-by: Amp <amp@ampcode.com>
Core now picks transformers with a disk's asset_transformer key instead of registered profiles (craftcms/cms#20542). Register the craft-cloud driver with AssetTransformers, drop the craftCloud profile and the defaultAssetTransformer switch, and detect Cloud storage from the asset's own disk, so scoped disks work. Amp-Thread-ID: https://ampcode.com/threads/T-01a1b2a5-ffcf-7312-966f-7e8624cf8b79 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a1b2a5-ffcf-7312-966f-7e8624cf8b79 Co-authored-by: Amp <amp@ampcode.com>
#20542 merged without the per-call transformer argument, so hand files that aren't in Cloud's bucket straight to the craft driver. Drop the branch pin and lock to 6.x at 8a13417. Amp-Thread-ID: https://ampcode.com/threads/T-01a1b2a5-ffcf-7312-966f-7e8624cf8b79 Co-authored-by: Amp <amp@ampcode.com>
Design the driver on core's contract instead of porting 3.x: map core parameters onto Cloudflare options, declare only the Cloudflare-only ones, report output dimensions, and use the focal point only for crops, like the craft driver. Sign with http-message-signatures directly, without 3.x's query normalization, and add the asset's revision after signing, since the gateway leaves v out of signatures. Trust each disk's asset_transformer choice instead of checking the bucket, and hand only non-S3 disks to the craft driver. Require craftcms/cms ^6.0.0-beta.1. Amp-Thread-ID: https://ampcode.com/threads/T-01a1b2a5-ffcf-7312-966f-7e8624cf8b79 Co-authored-by: Amp <amp@ampcode.com>
timkelty
force-pushed
the
cache-control-model
branch
from
November 10, 2026 18:22
fdf8c71 to
c0d2bac
Compare
timkelty
changed the base branch from
5.x
to
feature/craft-6-cloud-transforms
November 10, 2026 18:22
timkelty
force-pushed
the
cache-control-model
branch
from
November 10, 2026 18:24
c0d2bac to
5f931b2
Compare
Tag pages with their Craft cache tags and derive CDN-Cache-Control from the final response headers. Purge on every TagDependency invalidation, except drafts and revisions, with one queued PurgeStaticCache job per request, command or queue job, signed with #213's RequestSigner. Add a Clear Caches option and a single cloud:purge command. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-6551416a-ce7c-4e90-adac-8c2edc72248c
timkelty
force-pushed
the
cache-control-model
branch
from
November 10, 2026 18:25
5f931b2 to
2f2afa4
Compare
timkelty
force-pushed
the
feature/craft-6-cloud-transforms
branch
2 times, most recently
from
December 5, 2026 16:10
3692144 to
fbdc571
Compare
Contributor
Author
|
Closing in favor of #217, which rebuilds Cloud static caching on core's Follow-ups to check against #217. Each of these is in this PR, and I didn't find it in #217's description or file list:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Craft 6 static page caching for Craft Cloud. The middleware derives CDN cache policy from the final response, tags cached pages with Craft cache tags, and purges those tags through the signed gateway API.
Responses with authorization, session state, route or site tokens, or newly set cookies receive
no-store. The Caches utility andcloud:purgeprovide explicit full, tag, and prefix purges.This PR is stacked on #213 for
RequestSigner. GitHub can retarget it to5.xafter #213 merges. Queued purges also depend on the planned Bref Laravel bridge SQS handler; until that lands,cloud:purgeand the Caches utility run purges synchronously.Evidence
After:
StaticCacheTestcovers cache lifetimes, opt-out conditions, tag collection, overflow tags, invalidation filtering, queued purges, the Caches utility, andcloud:purge.Related issues