My frontend runs on nginx, and I'm serving a bunch of .chunk.js
files that are built from react.
Every time I update my frontend, I rebuild the docker image and update the kubernetes deployment. However, some users might still be trying to fetch the old js files.
I would like Google Cloud CDN to serve the stale, cached version of the old files, however it seems that it will only serve stale content in the event of errors or the server being unreachable, not a 404.
Cloud CDN also has something called "negative caching", however that seems to be for deciding how long a 404 is cached.
--> What's the best way to temporarily serve old files on Google Cloud? Can this be done with Cloud CDN?
(Ideally without some funky build process that requires deploying the old files as well)