How I Reduced Next.js ISR Writes from 6,000 to 200 Per Day With One Simple Code Change
Reduce Next.js ISR writes on Vercel by choosing smarter revalidation strategies. Use daily caching or on-demand updates to save API calls and optimize usage.

revalidate: 3600 in Next.js ISR — burning through Vercel's limits every month without realizing it. Here's the smarter caching strategy that cut my ISR writes by 97%.When you use Incremental Static Regeneration (ISR) in Next.js, the revalidate value tells Next.js how often to regenerate a page in the background. Setting revalidate: 3600 means every page will attempt a rebuild every hour — regardless of whether your data actually changed.
With 100 pages and normal traffic, that's 100 rebuilds × 24 hours = 2,400+ ISR writes per day minimum. Vercel's free and pro plans have limits, and this eats through them silently.
revalidate: 3600 on every page triggers automatic background rebuilds every hour — even when nothing has changed. This is the #1 cause of unexpected Vercel ISR overages.
If your content doesn't change multiple times a day, switch to a 24-hour cache. This alone cuts your ISR writes by 24×.
~24× more writes/day
Massive reduction in writes
const data = await fetchData();
return {
props: { data },
revalidate: 86400, // ✅ 24 hours — not 3600
};
}
This is the real power move. Set revalidate: false so the page is never automatically rebuilt. Then call the revalidation API only when something actually changes — on add, update, or delete.
revalidate: false. Trigger a rebuild only when data actually changes. Zero wasted ISR writes.
const data = await fetchData();
return {
props: { data },
revalidate: false, // ✅ Never auto-rebuild
};
}
export default async function handler(req, res) {
if (req.query.secret !== process.env.REVALIDATE_SECRET) {
return res.status(401).json({ message: 'Invalid token' });
}
try {
await res.revalidate(req.query.path); // e.g. '/blog/my-post'
return res.json({ revalidated: true });
} catch (err) {
return res.status(500).send('Error revalidating');
}
}
await fetch(`/api/revalidate?secret=${SECRET}&path=/blog/${slug}`);
// That's it. One ISR write. Only when needed.
Before: pages rebuilding every hour all day and night, burning through Vercel limits silently. After: pages cached until you explicitly tell Next.js to rebuild them — a write only happens on actual content changes.
Don't use revalidate: 3600 — it rebuilds every page every hour with no regard for whether data changed.
Use revalidate: 86400 if your content changes at most once a day — simple drop-in improvement.
Best: Use revalidate: false + on-demand revalidation via API. Cache forever, rebuild only on actual updates. This is the right way to use ISR at scale.


