[PR #626] [MERGED] refactor: extract app page cache helpers #724

Closed
opened 2026-05-06 13:09:48 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/626
Author: @southpolesteve
Created: 3/21/2026
Status: Merged
Merged: 3/21/2026
Merged by: @southpolesteve

Base: mainHead: codex/app-page-cache-runtime


📝 Commits (3)

  • 47dd285 refactor: extract app page cache helpers
  • 08cd46d chore: tighten app page cache extraction
  • 76e233f test: refresh app page cache snapshots

📊 Changes

5 files changed (+942 additions, -990 deletions)

View changed files

📝 packages/vinext/src/entries/app-rsc-entry.ts (+71 -136)
packages/vinext/src/server/app-page-cache.ts (+175 -0)
📝 tests/__snapshots__/entry-templates.test.ts.snap (+408 -816)
tests/app-page-cache.test.ts (+268 -0)
📝 tests/app-router.test.ts (+20 -38)

📄 Description

Summary

  • extract App Router APP_PAGE cache HIT/STALE/background-regeneration orchestration into a typed server helper
  • keep the generated RSC entry focused on page-specific rendering by delegating cache reads and response shaping
  • add focused unit coverage for HTML/RSC cache hits, stale regeneration, and cache-read failures

Testing

  • vp check packages/vinext/src/server/app-page-cache.ts packages/vinext/src/entries/app-rsc-entry.ts tests/app-page-cache.test.ts tests/app-router.test.ts
  • vp test run tests/app-page-cache.test.ts tests/entry-templates.test.ts tests/app-router.test.ts -t "ISR cache|cached rscData|generated code treats html"
  • vp test run tests/app-page-cache.test.ts tests/nextjs-compat/app-routes.test.ts
  • vp run vinext#build

Stacked on #625.

Written by Codex.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/626 **Author:** [@southpolesteve](https://github.com/southpolesteve) **Created:** 3/21/2026 **Status:** ✅ Merged **Merged:** 3/21/2026 **Merged by:** [@southpolesteve](https://github.com/southpolesteve) **Base:** `main` ← **Head:** `codex/app-page-cache-runtime` --- ### 📝 Commits (3) - [`47dd285`](https://github.com/cloudflare/vinext/commit/47dd285a9cddf20dcaa27e0197a8f2f540df6562) refactor: extract app page cache helpers - [`08cd46d`](https://github.com/cloudflare/vinext/commit/08cd46dca23607043a42b5dc49d0409e0cab40b3) chore: tighten app page cache extraction - [`76e233f`](https://github.com/cloudflare/vinext/commit/76e233f7c528ec2a4abb050364c69e302da07472) test: refresh app page cache snapshots ### 📊 Changes **5 files changed** (+942 additions, -990 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/entries/app-rsc-entry.ts` (+71 -136) ➕ `packages/vinext/src/server/app-page-cache.ts` (+175 -0) 📝 `tests/__snapshots__/entry-templates.test.ts.snap` (+408 -816) ➕ `tests/app-page-cache.test.ts` (+268 -0) 📝 `tests/app-router.test.ts` (+20 -38) </details> ### 📄 Description ## Summary - extract App Router APP_PAGE cache HIT/STALE/background-regeneration orchestration into a typed server helper - keep the generated RSC entry focused on page-specific rendering by delegating cache reads and response shaping - add focused unit coverage for HTML/RSC cache hits, stale regeneration, and cache-read failures ## Testing - vp check packages/vinext/src/server/app-page-cache.ts packages/vinext/src/entries/app-rsc-entry.ts tests/app-page-cache.test.ts tests/app-router.test.ts - vp test run tests/app-page-cache.test.ts tests/entry-templates.test.ts tests/app-router.test.ts -t "ISR cache|cached rscData|generated code treats html" - vp test run tests/app-page-cache.test.ts tests/nextjs-compat/app-routes.test.ts - vp run vinext#build Stacked on #625. Written by Codex. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:09:48 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#724
No description provided.