Next.js Discord

Discord Forum

not-found.js file hit cache each time when load any page

Unanswered
Encyrtid wasp posted this in #help-forum
Open in Discord
Encyrtid waspOP
I have cache all route segment where i am triggering notFound() function to render 404 page, in addition i have dynamic data in 404 page as per screenshot
, when i visit any of my frontend page, the query that i called inside not-found.js hit cache every time, does this is right behaviour ?

i am using App router.

1 Reply

Encyrtid waspOP
this is my not-found.js file -