mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #445] [MERGED] fix: App Router ISR invalidation parity for fetch and path tags #574
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#574
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/445
Author: @JaredStowell
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/11/2026
Merged by: @james-elicx
Base:
main← Head:jstowell/fix-app-router-isr-tag-invalidation📝 Commits (3)
bd1e2b7Fix App Router ISR tag parity5c2908aFix KV tag persistence19d97e6Fix KV cache tag handling📊 Changes
5 files changed (+288 additions, -65 deletions)
View changed files
📝
packages/vinext/src/cloudflare/kv-cache-handler.ts(+4 -2)📝
packages/vinext/src/entries/app-rsc-entry.ts(+21 -9)📝
tests/__snapshots__/entry-templates.test.ts.snap(+126 -54)📝
tests/app-router.test.ts(+73 -0)📝
tests/kv-cache-handler.test.ts(+64 -0)📄 Description
Fix App Router ISR page cache tagging so invalidation matches Next.js behavior more closely.
Previously, App Router page ISR entries in the generated RSC entry only stored
tags: [], which meant:revalidateTag()could not invalidate page cache entries by collected fetch tagsrevalidatePath()did not have path tags attached to the same page entriesThis change updates App Router page ISR writes to attach:
pathnameand_N_T_${pathname}That applies to:
Tests
Added/updated coverage for:
revalidateTag()revalidatePath()Verification
Ran:
pnpm test tests/app-router.test.ts tests/entry-templates.test.ts -upnpm run fmtpnpm run typecheckThis closes the App Router ISR tagging gap so page cache entries participate in both tag-based and path-based invalidation.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.