I’m currently running the staging environment for a large project with 50+ dynamic pages. They implement time-based revalidation every 5 minutes on Vercel’s free tier.
Plus I have to import data for many more pages with dynamic params (like /posts/[slug]), where I cache them and have implemented revalidation of 5 mins as well.
Does the build time for those pages count towards the 6000 build minutes on Vercel hobby tier?
How would I go about calculating total revalidation time for them? Is it something I should worry about?
Should I delete the automatic deployments for new branches after I’m done with them, if they gobble up my build minutes as well?
I’m using the latest NextJS 14.0.3
2
Answers
So after digging around the documentation and experimenting with my Usage stats for a while this is what I found out:
No, only data revalidation occurs and pages are not actually "rebuilt" in the traditional sense. Build minutes are only counted for deployments.
Not something to worry about at this scale since increasing revalidations hardly dented the free tier revalidation limit.
N/A because ISR or time-based revalidation doesn't take away build time.
If you are using an external api inside you /[slug] page without any revalidation then that mean next.js will bydefault will cache the api and each time you will get same response from that particular api or in other word the build will remain same and the page will be fully cached.
If you want to have the latest data each time you refresh the page then you have add this on top of the slug page.
If you wish to cache the page for 5 min then you can use revalidate.