Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jbuck opened this issue Nov 17, 2022 · 2 comments
Open

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

jbuck opened this issue Nov 17, 2022 · 2 comments
Labels
public public Balrog app/api (aus5.mozilla.org; aus-api.mozilla.org)

Comments

@jbuck
Copy link
Contributor

jbuck commented Nov 17, 2022

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

@jcristau jcristau added the public public Balrog app/api (aus5.mozilla.org; aus-api.mozilla.org) label Jan 3, 2023
@bhearsum
Copy link
Contributor

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

@jcristau
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
public public Balrog app/api (aus5.mozilla.org; aus-api.mozilla.org)
Projects
None yet
Development

No branches or pull requests

3 participants