| Summary: | results.webkit.org: Cache archive content | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jonathan Bedard <jbedard> | ||||||
| Component: | Tools / Tests | Assignee: | Jonathan Bedard <jbedard> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | aakash_jain, commit-queue, webkit-bug-importer, zhifei_fang | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Jonathan Bedard
2020-02-11 15:09:16 PST
Created attachment 390446 [details]
Patch
This is a pretty tremendous perf win, with it, I feel comfortable linking to and exposing archive details from the existing UI. Comment on attachment 390446 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390446&action=review > Tools/resultsdbpy/resultsdbpy/flask_support/util.py:127 > + response.headers.add('Expires', (datetime.now() + timedelta(hours=hours)).strftime('%a, %d %b %Y %H:%M:%S GMT')) https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires “If there is a Cache-Control header with the max-age or s-maxage directive in the response, the Expires header is ignored.” Comment on attachment 390446 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390446&action=review >> Tools/resultsdbpy/resultsdbpy/flask_support/util.py:127 >> + response.headers.add('Expires', (datetime.now() + timedelta(hours=hours)).strftime('%a, %d %b %Y %H:%M:%S GMT')) > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires > “If there is a Cache-Control header with the max-age or s-maxage directive in the response, the Expires header is ignored.” So we can just use the max-age, then. Interesting that most web-servers I've pinged seem to set both Created attachment 390459 [details]
Patch
(In reply to Jonathan Bedard from comment #4) > Comment on attachment 390446 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=390446&action=review > > >> Tools/resultsdbpy/resultsdbpy/flask_support/util.py:127 > >> + response.headers.add('Expires', (datetime.now() + timedelta(hours=hours)).strftime('%a, %d %b %Y %H:%M:%S GMT')) > > > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires > > “If there is a Cache-Control header with the max-age or s-maxage directive in the response, the Expires header is ignored.” > > So we can just use the max-age, then. > > Interesting that most web-servers I've pinged seem to set both While this is because cache-control introduced in http 1.1 they have both defined for support http 1.0 I guess unofficially r=me Comment on attachment 390459 [details] Patch Clearing flags on attachment: 390459 Committed r256453: <https://trac.webkit.org/changeset/256453> All reviewed patches have been landed. Closing bug. |