We have added CDN to our multiclusteringress as per documentation but we have an issue with the Age response header. (https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-configuration#cloud_cdn) Note that since we are using mutliclusteringress we don't have access to all the parameters.
We have a public max-age of 3600 or larger. (but this is limited to 3600 by Google CDN towards the clients.
The problem is that sometimes the CDN is serving files with an Age response header larger than 3600. This in turn leads to a 304 Not Modified for every request to that resource.
How should the backend respond to avoid having this Age > 3600 for every subsequent request.
Edit: We tried to set a s-max-age:600 to make sure the CDN goes to the origin server more often. However now it seems to re-download the entire file instead of doing the 304 check every hour?
According to this documentation expiration of cache entry is an upper bound of how long the cache entry remains valid and there is no guarantee that the cache entry will remain until the cache is expire. More information can be found on the link shared.
I believe public max-age can be change under Cache Control Metada, you can try changing the max-age value any length you require.