Revalidate issues
Unanswered
Cape lion posted this in #help-forum
Cape lionOP
I am hosting my application both on vercel and netlify. I have a bunch of fetch components to fetch data from by backend.
I am using
export async function someFunction(data) {
try {
const fetchPromises = data.results.map(async (element) => {
const link = `some url`;
await fetch(link, { next: { revalidate: 86400} });
});
await Promise.all(fetchPromises)
} catch (error) {
console.error("Error occurred", error);
}
}I am using
revalidate to automatically grab new data after a fixed time (86400s = 1 day). But for some reason, it doesn't work on vercel but works completely fine on netlify. Is there something that I need to change in my code?