Skip to content

fix(cache): preserve staged cache invalidation parity - #3158

Draft
james-elicx wants to merge 2 commits into
codex/cdn-v2-cloudflare-prewarmfrom
codex/cdn-v2-cache-tags
Draft

fix(cache): preserve staged cache invalidation parity#3158
james-elicx wants to merge 2 commits into
codex/cdn-v2-cloudflare-prewarmfrom
codex/cdn-v2-cache-tags

Conversation

@james-elicx

@james-elicx james-elicx commented Sep 2, 2026

Copy link
Copy Markdown
Member

Part 14 of 16 in the staged CDN adapter stack. Depends on #3153.

Summary

  • preserves canonical invalidation tags through Vary-based cache-key expansion and clean-EOF admission
  • tags Pages HTML/data responses consistently and purges regenerated response variants after revalidation
  • keeps staged caches partitioned by public authority during invalidation
  • extends App, Pages, and Cloudflare adapter regression coverage

Validation

  • focused cache, revalidation, request-pipeline, and Cloudflare adapter tests
  • PPR cacheability E2E: 8 passed
  • cumulative exact-tip changed-test sweep: 3,461 passed, 2 skipped

Review size

  • Implementation: +121 / -37 LOC
  • Tests and fixtures: +440 / -48 LOC
  • Other (docs, config, lockfile): +0 / -0 LOC
  • 19 changed files

Measured against codex/cdn-v2-cloudflare-prewarm after rebasing onto main@a6931c0.

@pkg-pr-new

pkg-pr-new Bot commented Sep 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@3158
npm i https://pkg.pr.new/create-vinext-app@3158
npm i https://pkg.pr.new/@vinext/types@3158
npm i https://pkg.pr.new/vinext@3158

commit: c6d223d

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
workers-cache preview production
static-export preview production
web preview production

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared c6d223d against base a4f1d69 using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.3 KB 142.4 KB ⚫ +0.0%
Client entry size (gzip) vinext 129.6 KB 129.6 KB ⚫ +0.0%
Dev server cold start vinext 3.22 s 3.22 s ⚫ -0.1%
Production build time vinext 3.43 s 3.42 s ⚫ -0.4%
RSC entry closure size (gzip) vinext 125.6 KB 125.5 KB ⚫ -0.1%
Server bundle size (gzip) vinext 216.4 KB 216.2 KB ⚫ -0.1%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from 8f41a34 to 8e12e1f Compare September 2, 2026 13:41
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch 2 times, most recently from bec6145 to f8def57 Compare September 2, 2026 15:11
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from f8def57 to f333564 Compare September 2, 2026 15:21
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from f333564 to 20f5815 Compare September 2, 2026 15:27
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from 20f5815 to f93348c Compare September 2, 2026 15:36
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from f93348c to b4d3480 Compare September 2, 2026 15:41
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from b4d3480 to 91896c6 Compare September 2, 2026 16:26
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from 91896c6 to e526261 Compare September 2, 2026 16:32
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from e526261 to d847bc9 Compare September 2, 2026 16:37
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from d847bc9 to 0828e2e Compare September 2, 2026 16:46
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from 0828e2e to cd63619 Compare September 2, 2026 17:12
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from cd63619 to ad59d2f Compare September 2, 2026 18:47
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from ad59d2f to b5d0da2 Compare September 2, 2026 18:57
@james-elicx
james-elicx force-pushed the codex/cdn-v2-cache-tags branch from b5d0da2 to c6d223d Compare September 2, 2026 19:09
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