How frequently should I "revalidate" ISR page?
Answered
neon posted this in #help-forum
neonOP
I wanna learn what exactly does
More importantly, I wanna know what would be the best value for
revalidate
do in nextjs. Does it completely recompile the page (i.e. generateStaticParams
) or only update the cached data? More importantly, I wanna know what would be the best value for
export const revalidate
for me? I have a e-commerce website with about 100 products (the page /product/[slug]
is statically generated using generateStaticParams
). So how frequently can I afford to revalildate the page till it gets too frequent?Answered by Anay-208 | Ping in replies
From what I know, revalidate updates the data which needs to be updated, and doesn't recompile the entire page.
generateStaticParams is not even needed, since it can also be done at the time of request
generateStaticParams is not even needed, since it can also be done at the time of request
11 Replies
neonOP
bump
Are you using static build?
neonOP
bump cause still not answered... (im starting to think my question is stupid)
Wuchang bream
revalidate how often you want and need
@neon I wanna learn what exactly does `revalidate` do in nextjs. Does it completely recompile the page (i.e. `generateStaticParams`) or only update the cached data?
More importantly, I wanna know what would be the best value for `export const revalidate` for me? I have a e-commerce website with about 100 products (the page `/product/[slug]` is statically generated using `generateStaticParams`). So how frequently can I afford to revalildate the page till it gets too frequent?
From what I know, revalidate updates the data which needs to be updated, and doesn't recompile the entire page.
generateStaticParams is not even needed, since it can also be done at the time of request
generateStaticParams is not even needed, since it can also be done at the time of request
Answer
@Anay-208 | Ping in replies From what I know, revalidate updates the data which needs to be updated, and doesn't recompile the entire page.
generateStaticParams is not even needed, since it can also be done at the time of request
neonOP
Ah, okay! Just to make sure, it has no effect on SEO right? Like I won't get bad performance from robots if i revalidate too often right?
@neon Ah, okay! Just to make sure, it has no effect on SEO right? Like I won't get bad performance from robots if i revalidate too often right?
As long as your database is fast, it won’t have might affect on SEO.
Setting a perfect re validation depends upon your use case, like how often stuff is updated
Setting a perfect re validation depends upon your use case, like how often stuff is updated
neonOP
Thank you so much!