mozilla-releng/balrog

Add a Cache-Control max-age header to update responses

Opened this issue · 2 comments

jbuck commented

In https://bugzilla.mozilla.org/show_bug.cgi?id=1775226 we've been having issues with stale content being served by the CDN. @jcristau thought that adding a Cache-Control max-age header may help with this

Are we sure this isn't set? I see it in

setattr(app, "cacheControl", app.config.get("CACHE_CONTROL", "public, max-age=90"))
, and in responses:

~/repos/balrog main *4 ❯ curl -ILv https://stage.balrog.nonprod.cloudops.mozgcp.net/update/3/Firefox/117.0/20230807001816/Linux_x86_64-gcc3/it/beta-localtest/default/default/default/update.xml\?force\=1 2>&1 | grep max-age
< strict-transport-security: max-age=31536000;
< cache-control: public,max-age=90
strict-transport-security: max-age=31536000;
cache-control: public,max-age=90

Yeah, you're right. I think the issue is the CDN is sending stale responses despite the max-age.