Fetching API what cache/revalidating to choose
Answered
Rhinelander posted this in #help-forum
RhinelanderOP
Hey, does anyone know what are the best fetching options if I fetch Strapi API. I want to have best SEO I don't want to revalidate contently when not needed etc... Maybe any ideas... its for my blog. I don't want to set revalidate to 3600 or 1200 etc.. I want instant change when I make change on my CMS. But I also don't want to revalidate constantly. What is best solution for my case.
Answered by B33fb0n3
you can do an on demand revalidation. Whenever you change something on your CMS you can revalidate the page. You can read about these method here:
https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#revalidating-data
https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#revalidating-data
3 Replies
you can do an on demand revalidation. Whenever you change something on your CMS you can revalidate the page. You can read about these method here:
https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#revalidating-data
https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#revalidating-data
Answer
RhinelanderOP
Thank you... I knew i saw something like that in the docs but couldn't find it afterwards...
ah nice, please mark solution