Next.js Discord

Discord Forum

Layout caching & playwright navigation

Unanswered
Sun bear posted this in #help-forum
Open in Discord
Avatar
Sun bearOP
A couple of questions related to caching of layouts between navigations and also how that interacts with Playwright.

I have a page where a layout is marked as "force-dynamic". As I understand it that will bypass the "full route cache", but it may still be cached on clientside navigations. Is that correct?

In Playwright, if I call page.goto, does that perform a "full page navigation" even if I'm currently on a different page of the app? In that sense, will it then definitely be getting a non-cached version of the layout as it loads the whole page?

I'm having these questions because the layout contains some prefetching I'm doing for React Query, with a HydrationBoundary, and I'm seeing problems in Playwright tests it seems to be missing just-created data after performing a page.goto

0 Replies