What's the best practice to setup revalidation time?
Answered
Vadym posted this in #help-forum
VadymOP
Sup! I try implementing "on-demand incremental static regeneration" in a dynamic folder.
I paused for a moment to decide when to schedule the revalidation time.
In my opinion, if I can revalidate the page through webhook from my API in this case revalidation time isn't important for me and I can set revalidation time for a long time, right?
I just want to get some advice from guys who already worked with it for a long time, maybe some cons and pros, etc...
I paused for a moment to decide when to schedule the revalidation time.
In my opinion, if I can revalidate the page through webhook from my API in this case revalidation time isn't important for me and I can set revalidation time for a long time, right?
I just want to get some advice from guys who already worked with it for a long time, maybe some cons and pros, etc...
Answered by B33fb0n3
if you dont provide a revalidation time it will be cache unlimited. So there is no need for a long revalidation time. Decide how you want to handle caching and then write your code like this
2 Replies
@Vadym Sup! I try implementing "on-demand incremental static regeneration" in a dynamic folder.
I paused for a moment to decide when to schedule the revalidation time.
In my opinion, if I can revalidate the page through webhook from my API in this case revalidation time isn't important for me and I can set revalidation time for a long time, right?
I just want to get some advice from guys who already worked with it for a long time, maybe some cons and pros, etc...
if you dont provide a revalidation time it will be cache unlimited. So there is no need for a long revalidation time. Decide how you want to handle caching and then write your code like this
Answer