NuxtN
Nuxt11mo ago
4 replies
Tackleberry

Nitro cache not expiring on error

If a cached nitro handler throws an error, will the error prevent the cached result from being purged from cache even if the age of the cached result is way beyond its config? Is that intended behavior? I have a route that shows an outdated cached result and I think it's because now the api route throws a 404 in the handler because the underlying data is no longer available. But the nuxt API route does not reflect this, instead still showing the old and outdated cached result. This seems unintuitive to me?
Was this page helpful?