Next.js Discord

Discord Forum

Custom cache handler with dynamic page + static params

Unanswered
Gharial posted this in #help-forum
Open in Discord
GharialOP
Hi, I'm unsure if this is a bug or an issue with my implementation. I couldn't find anything in the GitHub issues or docs, so I'm posting here before filing a bug report.

I've set up a Next.js project with a custom cache handler using the @neshca/cache-handler package, which works fine for normal pages. However, when I create a dynamic route (e.g., /test/[test]/page.tsx) with export const dynamicParams = false, it works in dev mode but gives a 404 for static params after a production build (next start).

Here's a minimal reproduction for reference: https://github.com/maxquinn/test-cache-static-bug. I feel like I'm missing something obvious or maybe this is a bug with either Next or the @neshca/cache-handler pacakage. Any help would be much appreciated. Thanks.

1 Reply

GharialOP
Haven't had any luck here so I've posted a GitHub issue here for anyone that finds this thread: https://github.com/vercel/next.js/issues/67771