ServerActions and ISR
Hey, does anyone know how to do on demand revalidation (ISR) using the new AppRouter? mainly non fetch based data (db query, computing, etc).
7 Replies
I believe that server components are cached by default
Unless you need some cookie or header specific thing inside the route, just setting an invalidation config is enough
i've got a simple example of a db query and a form with a serverAction to post
when i enable the serverAction the page gets set as λ (Server)
and its not cached
Data Fetching: Revalidating
Learn about revalidating data in Next.js using Incremental Static Regeneration.
for app dir
Data Fetching: Server Actions
Use Server Actions to mutate data in your Next.js application.
both of them do the trick
god , thanks , why i never found that page
nope i must be doing something wrong, its still considered as SSR
@nyx (Rustular DevRel) turns out its a bug, thanks for the help., imma close this and wait for fix.