Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Issue 1790503005: Provide and respect HTTP cache headers in pub serve. (Closed)

Created:
4 years, 9 months ago by Bob Nystrom
Modified:
4 years, 9 months ago
Reviewers:
nweiz
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/pub.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Provide and respect HTTP cache headers in pub serve. In my local tests, this has a negligible performance impact on packages with lots of small files, but is helpful for large unchanged assets. R=nweiz@google.com Committed: https://github.com/dart-lang/pub/commit/642addca734b05cb401e3ce656c6f5712adfd6d0

Patch Set 1 #

Total comments: 5

Patch Set 2 : Revise! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -16 lines) Patch
M lib/src/barback/barback_server.dart View 1 5 chunks +48 lines, -12 lines 0 comments Download
M lib/src/command/serve.dart View 1 chunk +6 lines, -1 line 0 comments Download
M lib/src/utils.dart View 1 chunk +1 line, -1 line 0 comments Download
A test/serve/caches_unchanged_assets.dart View 1 chunk +41 lines, -0 lines 0 comments Download
A test/serve/does_not_cache_changed_asset.dart View 1 chunk +48 lines, -0 lines 0 comments Download
M test/serve/utils.dart View 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Bob Nystrom
4 years, 9 months ago (2016-03-12 01:21:08 UTC) #2
nweiz
lgtm https://codereview.chromium.org/1790503005/diff/1/lib/src/barback/barback_server.dart File lib/src/barback/barback_server.dart (right): https://codereview.chromium.org/1790503005/diff/1/lib/src/barback/barback_server.dart#newcode170 lib/src/barback/barback_server.dart:170: var assetSha = CryptoUtils.bytesToHex(sha.close()); CryptoUtils is going to ...
4 years, 9 months ago (2016-03-12 01:30:51 UTC) #3
Bob Nystrom
Committed patchset #2 (id:20001) manually as 642addca734b05cb401e3ce656c6f5712adfd6d0 (presubmit successful).
4 years, 9 months ago (2016-03-14 19:15:02 UTC) #5
Bob Nystrom
Thanks! https://codereview.chromium.org/1790503005/diff/1/lib/src/barback/barback_server.dart File lib/src/barback/barback_server.dart (right): https://codereview.chromium.org/1790503005/diff/1/lib/src/barback/barback_server.dart#newcode170 lib/src/barback/barback_server.dart:170: var assetSha = CryptoUtils.bytesToHex(sha.close()); On 2016/03/12 01:30:51, nweiz ...
4 years, 9 months ago (2016-03-14 19:15:10 UTC) #6
nweiz
https://codereview.chromium.org/1790503005/diff/1/lib/src/barback/barback_server.dart File lib/src/barback/barback_server.dart (right): https://codereview.chromium.org/1790503005/diff/1/lib/src/barback/barback_server.dart#newcode170 lib/src/barback/barback_server.dart:170: var assetSha = CryptoUtils.bytesToHex(sha.close()); On 2016/03/14 19:15:10, Bob Nystrom ...
4 years, 9 months ago (2016-03-14 19:29:13 UTC) #7
Bob Nystrom
4 years, 9 months ago (2016-03-14 20:02:16 UTC) #8
Message was sent while issue was closed.
On 2016/03/14 19:29:13, nweiz wrote:
>
https://codereview.chromium.org/1790503005/diff/1/lib/src/barback/barback_ser...
> File lib/src/barback/barback_server.dart (right):
> 
>
https://codereview.chromium.org/1790503005/diff/1/lib/src/barback/barback_ser...
> lib/src/barback/barback_server.dart:170: var assetSha =
> CryptoUtils.bytesToHex(sha.close());
> On 2016/03/14 19:15:10, Bob Nystrom wrote:
> > On 2016/03/12 01:30:51, nweiz wrote:
> > > CryptoUtils is going to get removed once I get around to it—use the hex
> > > converter from package:convert instead.
> > 
> > I didn't see anything related to hex in there, so switched this to use
base64
> > instead, but done.
> 
> https://www.dartdocs.org/documentation/convert/1.0.1/convert/hex-constant.html

Oh, I see. For some dumb reason I saw "package:convert" and read "dart:convert".
Either way, I think base64 is probably better anyway: it's smaller.

– bob

Powered by Google App Engine
This is Rietveld 408576698