I think I might've been unnecessarily anxious about this. Any call to `cookies()` - which all private stuff depends on - automatically opts nextjs out of the caching
@alexdotjs
@nextjs
Yeah, in my exp you have to put "force-dynamic" or "force-static" depending of if you want static vs dynamic content.
I found automatic detection a pretty bad DX for now. Maybe it could work nice with PPR.
@alexdotjs
@nextjs
yeah - unfortunately, it's painful. I still don't understand why can't they do a better API design/similar as react query do - do not modify the way I fetch data, instead give me the tools to cache it properly, see more:
@alexdotjs
@nextjs
This will opt in into dynamic mode. Unfortunately you will still run into router (client) cache that invalidates every 30 seconds (for dynamically generated pages) - to fix this you will need to heavily rely on revalidatePath or revalidateTag or router.refresh.