[PR #381] [MERGED] fix: avoid shared cache headers for dynamic GET handlers #526

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

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/381
Author: @NathanDrake2406
Created: 3/9/2026
Status: Merged
Merged: 3/9/2026
Merged by: @james-elicx

Base: mainHead: fix/route-handler-dynamic-cache


📝 Commits (1)

  • 1229eaa fix: avoid shared cache headers for dynamic GET handlers

📊 Changes

4 files changed (+97 additions, -14 deletions)

View changed files

📝 packages/vinext/src/entries/app-rsc-entry.ts (+9 -2)
📝 tests/__snapshots__/entry-templates.test.ts.snap (+54 -12)
tests/fixtures/app-basic/app/api/dynamic-request-data/route.ts (+13 -0)
📝 tests/nextjs-compat/app-routes.test.ts (+21 -0)

📄 Description

Summary

  • consume the dynamic-usage signal before auto-applying revalidate cache headers in App Router GET route handlers
  • add a regression fixture and compat test for GET + revalidate + headers()/cookies()
  • refresh entry template snapshots for the generated App Router entry

Testing

  • pnpm test tests/nextjs-compat/app-routes.test.ts
  • pnpm test tests/entry-templates.test.ts -u
  • pnpm test tests/app-router.test.ts -t "route handler"

🔄 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/381 **Author:** [@NathanDrake2406](https://github.com/NathanDrake2406) **Created:** 3/9/2026 **Status:** ✅ Merged **Merged:** 3/9/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `fix/route-handler-dynamic-cache` --- ### 📝 Commits (1) - [`1229eaa`](https://github.com/cloudflare/vinext/commit/1229eaaee67073c0e3303ac6e2513e62ccb9029f) fix: avoid shared cache headers for dynamic GET handlers ### 📊 Changes **4 files changed** (+97 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/entries/app-rsc-entry.ts` (+9 -2) 📝 `tests/__snapshots__/entry-templates.test.ts.snap` (+54 -12) ➕ `tests/fixtures/app-basic/app/api/dynamic-request-data/route.ts` (+13 -0) 📝 `tests/nextjs-compat/app-routes.test.ts` (+21 -0) </details> ### 📄 Description ## Summary - consume the dynamic-usage signal before auto-applying `revalidate` cache headers in App Router GET route handlers - add a regression fixture and compat test for `GET + revalidate + headers()/cookies()` - refresh entry template snapshots for the generated App Router entry ## Testing - [x] `pnpm test tests/nextjs-compat/app-routes.test.ts` - [x] `pnpm test tests/entry-templates.test.ts -u` - [x] `pnpm test tests/app-router.test.ts -t "route handler"` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:08:34 +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#526
No description provided.