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.
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.
<rdar://problem/59392678>