Skip to content

feat(cloudflare): isolate Workers Cache with staged entrypoints - #3079

Draft
james-elicx wants to merge 3 commits into
codex/cdn-stack-corefrom
codex/cdn-entrypoint-cache
Draft

feat(cloudflare): isolate Workers Cache with staged entrypoints#3079
james-elicx wants to merge 3 commits into
codex/cdn-stack-corefrom
codex/cdn-entrypoint-cache

Conversation

@james-elicx

@james-elicx james-elicx commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • make the default Worker entrypoint an uncached gateway that always runs middleware and routing
  • add a cache-enabled VinextCachedResponse Worker entrypoint for reusable render responses
  • configure per-entrypoint Workers Cache settings in the generated Wrangler output
  • use ctx.exports for shared dispatch while keeping bypass work uncached
  • preserve custom Worker entrypoints, revalidation purges, static assets, and existing app configuration
  • lazy-load request and response stages so cache hits do not evaluate application rendering code

Stack

  1. tooling baseline (chore(deps): update Cloudflare Workers tooling #3082)
  2. transport-neutral worker stages (feat(build): add transport-neutral worker stages #3083)
  3. This PR: Cloudflare Workers Cache entrypoint isolation (feat(cloudflare): isolate Workers Cache with staged entrypoints #3079)
  4. independently deployed HTTP stages (feat(build): support independently deployed worker stages #3084)
  5. Workers Cache tag parity (fix(cloudflare): preserve Workers Cache tag parity #3085)

Validation

  • CI: all 68 checks passed
  • 49 focused Cloudflare config, build, facade, and handler tests passed locally
  • vp check and Knip
  • vp run vinext#build
  • vp run @vinext/cloudflare#build

The prior combined branch was split without changing this layer's runtime behavior.

Comment thread tests/fixtures/multi-stage-http/http-stage-node.ts Fixed
@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Please use an 8 minute time limit.

@pkg-pr-new

pkg-pr-new Bot commented Aug 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 379ae5b

@ask-bonk

ask-bonk Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

error: Your local changes to the following files would be overwritten by checkout:
pnpm-lock.yaml
Please commit your changes or stash them before you switch branches.
Aborting

github run

@ask-bonk

ask-bonk Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@james-elicx Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 379ae5b against base eacb78d 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.2 KB 142.2 KB ⚫ -0.0%
Client entry size (gzip) vinext 129.5 KB 129.5 KB ⚫ -0.0%
Dev server cold start vinext 3.31 s 3.34 s ⚫ +0.9%
Production build time vinext 3.69 s 3.66 s ⚫ -0.9%
RSC entry closure size (gzip) vinext 121.2 KB 121.1 KB ⚫ -0.0%
Server bundle size (gzip) vinext 205.1 KB 205.0 KB ⚫ -0.0%

View detailed results and traces

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

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Please use an 8 minute time limit. Review exact head d9c8ac4.

@ask-bonk

ask-bonk Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

error: Your local changes to the following files would be overwritten by checkout:
pnpm-lock.yaml
Please commit your changes or stash them before you switch branches.
Aborting

github run

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Please limit this review to 8 minutes.

@ask-bonk

ask-bonk Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

error: Your local changes to the following files would be overwritten by checkout:
pnpm-lock.yaml
Please commit your changes or stash them before you switch branches.
Aborting

github run

@github-actions

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
web preview production

@james-elicx
james-elicx force-pushed the codex/cdn-entrypoint-cache branch from bcb2872 to 4d186de Compare August 25, 2026 23:12
@james-elicx
james-elicx changed the base branch from main to codex/cdn-stack-core August 25, 2026 23:13
@james-elicx
james-elicx force-pushed the codex/cdn-stack-core branch from e242325 to 2a1a9d5 Compare August 25, 2026 23:15
@james-elicx
james-elicx force-pushed the codex/cdn-entrypoint-cache branch from 4d186de to 9d0abbb Compare August 25, 2026 23:15
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.

2 participants