Skip to content

refactor(cache): defer adapter initialization - #3143

Open
james-elicx wants to merge 4 commits into
codex/cdn-v2-contractsfrom
codex/cdn-v2-adapter-runtime
Open

refactor(cache): defer adapter initialization#3143
james-elicx wants to merge 4 commits into
codex/cdn-v2-contractsfrom
codex/cdn-v2-adapter-runtime

Conversation

@james-elicx

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

Copy link
Copy Markdown
Member

Part 3 of 16 in the staged CDN adapter stack. Depends on #3142.

Summary

  • makes declarative data-cache and CDN-adapter registration lazy and safe across duplicated stage module graphs
  • keeps imperative cache handlers authoritative for backwards compatibility
  • avoids pulling the data-cache implementation into an uncached request entrypoint until middleware actually uses it

Validation

  • focused cache-adapter and CDN-cache tests
  • focused format, lint, and type checks
  • cumulative exact-tip changed-test sweep: 3,461 passed, 2 skipped

Review size

  • Implementation: +178 / -22 LOC
  • Tests and fixtures: +196 / -11 LOC
  • Other (docs, config, lockfile): +0 / -0 LOC
  • 8 changed files

Measured against codex/cdn-v2-contracts 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@3143
npm i https://pkg.pr.new/create-vinext-app@3143
npm i https://pkg.pr.new/@vinext/types@3143
npm i https://pkg.pr.new/vinext@3143

commit: 030335e

@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 030335e against base b614b12 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.3 KB ⚫ +0.0%
Client entry size (gzip) vinext 129.6 KB 129.6 KB ⚫ -0.0%
Dev server cold start vinext 3.04 s 3.02 s ⚫ -0.9%
Production build time vinext 3.29 s 3.29 s ⚫ -0.2%
RSC entry closure size (gzip) vinext 119.2 KB 119.7 KB ⚫ +0.5%
Server bundle size (gzip) vinext 202.8 KB 203.4 KB ⚫ +0.3%

View detailed results and traces

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

@james-elicx
james-elicx force-pushed the codex/cdn-v2-adapter-runtime branch from 6e7eb00 to 6a7eec9 Compare September 2, 2026 09:43
@james-elicx
james-elicx force-pushed the codex/cdn-v2-adapter-runtime branch from 6a7eec9 to d80f4c4 Compare September 2, 2026 11:17
@james-elicx
james-elicx force-pushed the codex/cdn-v2-adapter-runtime branch 3 times, most recently from dc19074 to 1df658f Compare September 2, 2026 14:16
@james-elicx
james-elicx force-pushed the codex/cdn-v2-adapter-runtime branch from 1df658f to a012093 Compare September 2, 2026 16:26
@james-elicx
james-elicx force-pushed the codex/cdn-v2-adapter-runtime branch from a012093 to 030335e Compare September 2, 2026 17:12
@james-elicx
james-elicx marked this pull request as ready for review September 3, 2026 10:10
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