Skip to content

[5.x] Avoid replacing nocache regions in initial full-measure response#13953

Merged
jasonvarga merged 6 commits into5.xfrom
initial-response-replacements
Feb 18, 2026
Merged

[5.x] Avoid replacing nocache regions in initial full-measure response#13953
jasonvarga merged 6 commits into5.xfrom
initial-response-replacements

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

@duncanmcclean duncanmcclean commented Feb 16, 2026

This pull request adjusts full-measure to avoid nocache regions and csrf tokens being replaced in the initial response, allowing CDNs (like Cloudflare) to cache the placeholders and JS code.

Closes #13800

@jasonvarga jasonvarga changed the title [5.x] Add config to avoid replacing nocache regions in initial response [5.x] Avoid replacing nocache regions in initial full-measure response Feb 18, 2026
@jasonvarga
Copy link
Copy Markdown
Member

I've changed this to be the standard behavior (for full measure).

Rather than someone caching something incorrectly and then hunt for a solution/setting once they realized, we should just make it work correctly out of the box.

@jasonvarga jasonvarga merged commit 000abd5 into 5.x Feb 18, 2026
28 checks passed
@jasonvarga jasonvarga deleted the initial-response-replacements branch February 18, 2026 15:09
jasonvarga added a commit that referenced this pull request Feb 18, 2026
# Conflicts:
#	CHANGELOG.md
#	src/Fieldtypes/Icon.php
#	tests/StaticCaching/FullMeasureStaticCachingTest.php

this also adjusts CsrfTokenReplacer logic because the cleanly merged code from #13953 would've been incorrect.
@patrickomeara
Copy link
Copy Markdown

Thanks so much @duncanmcclean and @jasonvarga ! This takes away a pain point for me.

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.

Static caching first request is creating race condition with CDN

3 participants