Hello, does anyone have an idea how to fix cache invalidation? I'm getting this error:
ERROR [cache] SWR handler error.
Basically, I have a product detail page. If I disable the product in the backend and the API returns that it doesn't exist, I handle it on the frontend by throwing createError. However, this prevents SWR from invalidating the cache. So instead of returning a 404 page, it still shows the old product page.
Does anyone know how to fix this? I thought that using throw createError was the correct way to handle a missing product.