Bug 207589

Summary: results.webkit.org: Cache archive content
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: 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 Flags
Patch
none
Patch none

Jonathan Bedard
Reported 2020-02-11 15:09:16 PST
It occurred to me that we can (and should) ask the client to cache archive content since retrieving and unpacking that content is relatively expensive.
Attachments
Patch (3.96 KB, patch)
2020-02-11 15:26 PST, Jonathan Bedard
no flags
Patch (3.58 KB, patch)
2020-02-11 16:21 PST, Jonathan Bedard
no flags
Jonathan Bedard
Comment 1 2020-02-11 15:26:26 PST
Jonathan Bedard
Comment 2 2020-02-11 15:27:25 PST
This is a pretty tremendous perf win, with it, I feel comfortable linking to and exposing archive details from the existing UI.
Zhifei Fang
Comment 3 2020-02-11 16:09:17 PST
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.”
Jonathan Bedard
Comment 4 2020-02-11 16:15:37 PST
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
Jonathan Bedard
Comment 5 2020-02-11 16:21:52 PST
Zhifei Fang
Comment 6 2020-02-11 16:38:58 PST
(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
Zhifei Fang
Comment 7 2020-02-11 16:39:10 PST
unofficially r=me
WebKit Commit Bot
Comment 8 2020-02-12 10:48:03 PST
Comment on attachment 390459 [details] Patch Clearing flags on attachment: 390459 Committed r256453: <https://trac.webkit.org/changeset/256453>
WebKit Commit Bot
Comment 9 2020-02-12 10:48:05 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2020-02-12 10:49:12 PST
Note You need to log in before you can comment on or make changes to this bug.