mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #603] [CLOSED] fix: include query string in route handler ISR cache key #704
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#704
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/603
Author: @southpolesteve
Created: 3/20/2026
Status: ❌ Closed
Base:
main← Head:fix/include-query-in-route-handler-isr-key📝 Commits (2)
4b02051fix: include query string in route handler ISR cache key3e651eafix: normalize query params in ISR cache key and update tests📊 Changes
3 files changed (+92 additions, -15 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+13 -2)📝
tests/__snapshots__/entry-templates.test.ts.snap(+78 -12)📝
tests/app-router.test.ts(+1 -1)📄 Description
Summary
/api/data?user=aliceand/api/data?user=bobproduce distinct cache entries.Details
Previously,
__isrRouteKey(cleanPathname)used only the pathname for the cache key. Route handlers that return different responses based onsearchParamswould cache the first response and serve it for all subsequent requests regardless of query parameters.The fix extracts the query string from
request.urland appends it to the pathname before computing the cache key. Only GET/HEAD requests are affected (POST/PUT/etc. are never ISR-cached).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.