How to set cache time in netlify-builder Nuxt3

Hi guys!
I’ve got my application Nuxt3 and Apollo deployed in Netlify with the netlify-builder.
I’m not able to refresh the content when something change into the cms. The only way is rebuild the app.
I try to set some limit to the cache but nothing happens.

  routeRules: {
    '/typology/**': { swr: 120 },
    'product-family/**': { swr: 120 },
    '/product/**': { swr: 120 },
  },

Do you have an example or suggestions about that?
I would appreciated!

Thanks and Kind regards,
Davide

Based on the documentation: Rendering Modes · Nuxt Concepts, I believe you also might have to add the isr property as true.

1 Like

Hi!
Thanks!
I missed that part!
I tried, but the generated HTML still retains the old data. However, with AJAX navigation, it gets updated. I tried to add:

routeRules: {
  '/**': { isr: 80 }
}

I read this should refresh the content after 80 seconds (It’s Next doc but I think the isr works in the same way) : Next.js ISR on Netlify | Netlify Docs"

thanks and kind regards,

Davide

Thanks for providing this additional context to the community.