Hello!
We use a catch-all redirect to our backend to display pages which were not yet deployed to Netlify
/* https://backend.example.com/preview/:splat 200
The backend responds with a page which has the following header:
cache-control: max-age=600, public
Netlify caches the result of this rewrite.
But then we have a little cache invalidation issue. For example
- A visitor requests https://frontend.example.com/new-page
- Netlify redirects it to https://backend.example.com/preview/new-page
- The backend responses with a page, max-age is 10 minutes
- Netlify caches the page
Five minutes later a build and a Netlify deploy happen. The /new-page/index.html
is deployed to Netlify.
My expectation: Netlify replaces https://frontend.example.com/new-page contents with the newly deployed page.
What happens actually: Netlify still serves the cached version.
Is this behavior expected? I can’t find anything in the docs.