// 31 October: I added this to my blog's homepage export const revalidate = 600 ;
// 1 November: I deleted it and wrote this instead " use cache " ; cacheLife ( " hours " );
Enter fullscreen mode
Exit fullscreen mode
That's real, and it's in this blog's git history. On 31 October, I added revalidate to pages across the site. The next day, I turned on Next.js Cache Components and removed every one of them.
revalidate wasn't a bad line. It's a normal way to cache a Next.js page, and countless tutorials teach it. But the docs for the version I run say this about the switch I made:
After enabling the flag, route segments that still export dynamic , revalidate , or fetchCache will error.
So the same line can be correct in one project and an error in another, depending on the version and the setup. A tutorial can't know which one you have.…