Skip to content

feat(seed): optional preferRouteCacheKey for Next 16.4+ route cache - #18

Closed
jeroendegloire wants to merge 1 commit into
leejpsd:mainfrom
jeroendegloire:fix/seed-prefer-route-cache-key
Closed

jeroendegloire wants to merge 1 commit into
leejpsd:mainfrom
jeroendegloire:fix/seed-prefer-route-cache-key

Conversation

@jeroendegloire

Copy link
Copy Markdown
Contributor

Summary

Optional preferRouteCacheKey / CLI --prefer-route-cache-key writes App Router seed entries under meta.routeCache.key (/route-cache/APP_PAGE/<hash>/$/path) so Next 16.4+ Full Route Cache can HIT after a cold Redis seed. Default remains pathname keys.

Test plan

  • Unit: seeds under meta.routeCache.key when set; falls back to pathname when missing
  • Optional: dogfood seed with the flag against a Next 16.4 app and confirm x-nextjs-cache: HIT

Fixes #16

Split out of #15.

Write App Router seed entries under meta.routeCache.key when requested,
so Full Route Cache lookups HIT after a cold Redis seed (leejpsd#16).
@leejpsd

leejpsd commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Thank you for this, and sorry it sat unanswered for so long. I'm closing it in favour of #21, which fixes the same problem with a different shape: the seed picks up routeCache.key automatically when the build provides it, and it covers Pages Router too, so the preferRouteCacheKey option and CLI flag are not needed. You are credited as co-author on that commit.

It is out in 1.0.2. If anything behaves differently from your patch in your setup, please tell me.

@leejpsd leejpsd closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

seedBuildOutput writes pathname keys; Next 16.4+ Full Route Cache reads meta.routeCache.key

2 participants