-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unboxer has an unbustable cache, which can take weeks to clear out #64
Comments
The nginx cache is only for subdomains, so it uses either the nginx or CloudFlare caches, but not both. |
Thanks; I updated my description with the full story. Here are some options for what to do.
|
Fixes iftechfoundation#64. Setting max-age=0 ensures that we'll always return fresh HTML content. This won't blow out our bandwidth, because browsers/nginx/Cloudflare will still do conditional `GET` requests, which we'll respond with a cheap, fast "304 Not Modified" response in most cases. For subresources on on the subdomain, we already redirect them to the main domain, but now, we redirect them with a `?lastmod=###` parameter. URLs with that parameter can have a week-long max-age, because if they change, we'll switch to a different URL.
Fixes iftechfoundation#64. Setting max-age=0 ensures that we'll always return fresh HTML content. This won't blow out our bandwidth, because browsers/nginx/Cloudflare will still do conditional `GET` requests, which we'll respond with a cheap, fast "304 Not Modified" response in most cases. For subresources on on the subdomain, we already redirect them to the main domain, but now, we redirect them with a `?lastmod=###` parameter. URLs with that parameter can have a week-long max-age, because if they change, we'll switch to a different URL.
Fixes iftechfoundation#64. Setting max-age=0 ensures that we'll always return fresh HTML content. This won't blow out our bandwidth, because browsers/nginx/Cloudflare will still do conditional `GET` requests, which we'll respond with a cheap, fast "304 Not Modified" response in most cases. For subresources on on the subdomain, we already redirect them to the main domain, but now, we redirect them with a `?lastmod=###` parameter. URLs with that parameter can have a week-long max-age, because if they change, we'll switch to a different URL.
Fixes iftechfoundation#64. Setting max-age=0 ensures that we'll always return fresh HTML content. This won't blow out our bandwidth, because browsers/nginx/Cloudflare will still do conditional `GET` requests, which we'll respond with a cheap, fast "304 Not Modified" response in most cases. For subresources on on the subdomain, we already redirect them to the main domain, but now, we redirect them with a `?lastmod=###` parameter. URLs with that parameter can have a week-long max-age, because if they change, we'll switch to a different URL.
Fixes iftechfoundation#64. Setting max-age=0 ensures that we'll always return fresh HTML content. This won't blow out our bandwidth, because browsers/nginx/Cloudflare will still do conditional `GET` requests, which we'll respond with a cheap, fast "304 Not Modified" response in most cases. For subresources on on the subdomain, we already redirect them to the main domain, but now, we redirect them with a `?lastmod=###` parameter. URLs with that parameter can have a week-long max-age, because if they change, we'll switch to a different URL.
Unboxer has multiple layers of caching.
Master-Index.xml
file (revalidated via etag every five minutes)Master-Index.xml
file)Cache-Control: max-age
header on every responsemax-age: 86400
(24 hours)max-age: 604800
(7 days)Cache-Control
header.nginx
cache for subdomains, (which serve the HTML files themselves), caching all that stuff for 1 to 7 days, and passing along theCache-Control
headerCache-Control
header, caching everything for 1 to 7 days. For HTML documents, the user can refresh the cache by clicking the refresh button, but there's no easy user-visible way to refresh subresources in the user's browser.When the IF Archive team updates a zip, they update it in place. In the worst case, this means:
This would be a very unlucky outcome; but it's still pretty much guaranteed that any updates to a zip file won't be reflected on the unboxer for seven days, if only thanks to nginx caching.
EDIT: Updated since the nginx cache is only for subdomains, so it uses either the nginx or CloudFlare caches, but not both.
The text was updated successfully, but these errors were encountered: