There’s a Next.js 13 feature that allows revalidate fetched data after some time:
const results = fetch(url, {
cache: "force-cache",
next: {
revalidate: 10
}
})
I have an advanced project and i wouldn’t like to migrate to Next.13
There’s some way to achieve the next: {revalidate: 10}
behavior on Next 12 and pure js?
NOTE: this fetch call can be done multiple times, depending on the user’s actions, so I can’t use getStaticProps or the like. I understand that those functions allows fetch data only once