简体   繁体   中英

NextJS - ISR - How to Validate Forever Unless On-Demand Called

NextJS has a revalidation option.

revalidate: X

This is great for dynamically changing data for large sites with lots of visitors. But what if I don't change my data every minute, and don't want it to revalidate ever unless I manually call the on-demand revalidation through my app (like when a post gets updated).

I would like to cache my data unless the data gets manually updated in the database.

Can this be done, or is ISR not the best tool for the job?

Thanks,

J

If revalidate is omitted, Next.js will use the default value of false (no revalidation) and only revalidate the page on-demand when revalidate() is called.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM