-
Notifications
You must be signed in to change notification settings - Fork 42
Improve cache flags. Proper id on auth errors #309
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
# All changes Copyright 2022, OpenC3, Inc. | ||
# All Rights Reserved | ||
# | ||
# This file may also be used under the terms of a commercial license | ||
# This file may also be used under the terms of a commercial license | ||
# if purchased from OpenC3, Inc. | ||
|
||
require 'openc3/utilities/bucket' | ||
|
@@ -73,7 +73,7 @@ def self.get_cache_control(filename) | |
has_version_number = /(-|_|\.)\d+(-|_|\.)\d+(-|_|\.)\d+\./.match(filename) | ||
has_content_hash = /\.[a-f0-9]{20}\./.match(filename) | ||
return nil if has_version_number or has_content_hash | ||
return 'no-cache' | ||
return 'no-cache, max-age=3600' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to look this stuff up: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#request_directives So basically we're saying we allow the server to use a stored response that's less than 1hr old but we always want that response from the server (no local caching). Is that right? |
||
end | ||
|
||
def self.compress_file(filename, chunk_size = 50_000_000) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you ran into this condition somehow?