'Next.js getStaticProps revalidation not working all of a sudden?
I have author pages with the following getStaticProps:
export async function getStaticProps({ params }) {
const { slug } = params;
try {
const FILTER_URL = `${process.env.NEXT_PUBLIC_API_URL}/authors/?slug=${slug}`;
const filter = await axios.get(FILTER_URL);
const AUTHOR_URL = `${process.env.NEXT_PUBLIC_API_URL}/authors/${filter.data[0].id}/`;
const author = await axios.get(AUTHOR_URL);
return {
props: {
data: author.data,
},
revalidate: 10,
};
} catch (error) {
return {
notFound: true,
};
}
}
I've updated the data for an author page - and I can confirm that the backend AUTHOR_URL has this updated data - but the frontend does not update or revalidate.
I've also set up on-demand ISR revalidation set-up and manually revalidating the page returns {"revalidated":true} but the frontend remains the same.
It looks like any changes to an author page that I make today is not being updated or revalidated. However, I made changes to author pages yesterday and they are updated (and I have not rebuilt next.js in that time.)
Does anyone know what the issue might be here?
Is it possible this is just a temporary issue with my provider DigitalOcean's CDN?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
