[PR #684] [MERGED] refactor: share Pages ISR cache runtime #767

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

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/684
Author: @southpolesteve
Created: 3/25/2026
Status: Merged
Merged: 3/28/2026
Merged by: @james-elicx

Base: codex/pages-api-route-runtimeHead: codex/pages-isr-cache-runtime


📝 Commits (1)

  • 6706091 refactor: share pages isr cache runtime

📊 Changes

3 files changed (+50 additions, -89 deletions)

View changed files

📝 packages/vinext/src/entries/pages-server-entry.ts (+17 -41)
📝 tests/__snapshots__/entry-templates.test.ts.snap (+13 -41)
📝 tests/entry-templates.test.ts (+20 -7)

📄 Description

Summary

  • swap the Pages Router server entry over to the shared server/isr-cache.ts runtime instead of embedding a second ISR implementation in the generated template
  • keep the generated entry thin by delegating isrGet, isrSet, triggerBackgroundRegeneration, and isrCacheKey through typed helpers
  • update the generator assertions to check delegation instead of the removed inline ISR implementation details

Verification

  • vp check packages/vinext/src/entries/pages-server-entry.ts tests/entry-templates.test.ts
  • vp test run tests/entry-templates.test.ts tests/isr-cache.test.ts -u
  • vp test run tests/pages-router.test.ts -t "renders pages with getStaticPaths + getStaticProps|returns 404 for paths not in getStaticPaths when fallback is false|keeps ISR cache-fill rerenders isolated from the streamed render state|wraps stale regeneration in a fresh unified request context"
  • vp run vinext#build

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/684 **Author:** [@southpolesteve](https://github.com/southpolesteve) **Created:** 3/25/2026 **Status:** ✅ Merged **Merged:** 3/28/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `codex/pages-api-route-runtime` ← **Head:** `codex/pages-isr-cache-runtime` --- ### 📝 Commits (1) - [`6706091`](https://github.com/cloudflare/vinext/commit/670609134b979fc88ab08508ccb7def1067b53dd) refactor: share pages isr cache runtime ### 📊 Changes **3 files changed** (+50 additions, -89 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/entries/pages-server-entry.ts` (+17 -41) 📝 `tests/__snapshots__/entry-templates.test.ts.snap` (+13 -41) 📝 `tests/entry-templates.test.ts` (+20 -7) </details> ### 📄 Description ## Summary - swap the Pages Router server entry over to the shared `server/isr-cache.ts` runtime instead of embedding a second ISR implementation in the generated template - keep the generated entry thin by delegating `isrGet`, `isrSet`, `triggerBackgroundRegeneration`, and `isrCacheKey` through typed helpers - update the generator assertions to check delegation instead of the removed inline ISR implementation details ## Verification - `vp check packages/vinext/src/entries/pages-server-entry.ts tests/entry-templates.test.ts` - `vp test run tests/entry-templates.test.ts tests/isr-cache.test.ts -u` - `vp test run tests/pages-router.test.ts -t "renders pages with getStaticPaths + getStaticProps|returns 404 for paths not in getStaticPaths when fallback is false|keeps ISR cache-fill rerenders isolated from the streamed render state|wraps stale regeneration in a fresh unified request context"` - `vp run vinext#build` 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:10:01 +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#767
No description provided.