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

Issue 229053004: Allow cache reuse of some requests with Cache-Control headers (Closed)

Created:
6 years, 8 months ago by Nate Chapin
Modified:
6 years, 8 months ago
CC:
blink-reviews, gavinp+loader_chromium.org, yhirano
Visibility:
Public.

Description

Allow cache reuse of some requests with Cache-Control headers Traditionally, we have carefully handled Cache-Control headers that were set on a ResourceResponse, but have pretended Cache-Control doesn't exist on ResourceRequests. As of http://src.chromium.org/viewvc/blink?view=rev&rev=165603, we do the smarter naive thing, and never allow resources to be reused from MemoryCache if the ResourceRequest includes a Cache-Control header. This patch moves ResourceResponse's Cache-Control parsing to HTTPParsers and handles Cache-Control headers consistently, whether the header appears on a ResourceRequest or a ResourceResponse. BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171178

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : + parser test #

Patch Set 4 : + one more testcase #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+396 lines, -213 lines) Patch
M Source/core/fetch/CachingCorrectnessTest.cpp View 1 3 chunks +30 lines, -0 lines 0 comments Download
M Source/core/fetch/Resource.h View 2 chunks +6 lines, -5 lines 0 comments Download
M Source/core/fetch/Resource.cpp View 1 4 chunks +16 lines, -9 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M Source/platform/blink_platform.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/network/HTTPParsers.h View 2 chunks +18 lines, -0 lines 0 comments Download
M Source/platform/network/HTTPParsers.cpp View 2 chunks +143 lines, -0 lines 0 comments Download
A Source/platform/network/HTTPParsersTest.cpp View 1 2 3 4 1 chunk +101 lines, -0 lines 0 comments Download
M Source/platform/network/ResourceRequest.h View 3 chunks +6 lines, -0 lines 0 comments Download
M Source/platform/network/ResourceRequest.cpp View 1 chunk +35 lines, -2 lines 0 comments Download
M Source/platform/network/ResourceResponse.h View 4 chunks +7 lines, -11 lines 0 comments Download
M Source/platform/network/ResourceResponse.cpp View 7 chunks +30 lines, -184 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Nate Chapin
abarth: PTAL yhirano: Does this seem like a good interpretation of your intent in http://src.chromium.org/viewvc/blink?view=revision&revision=165603 ...
6 years, 8 months ago (2014-04-08 21:49:22 UTC) #1
abarth-chromium
LGTM Do we have unit tests for the header parser? If not, it might make ...
6 years, 8 months ago (2014-04-09 00:00:44 UTC) #2
yhirano
https://codereview.chromium.org/229053004/diff/20001/Source/core/fetch/ResourceFetcher.cpp File Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/229053004/diff/20001/Source/core/fetch/ResourceFetcher.cpp#newcode953 Source/core/fetch/ResourceFetcher.cpp:953: if (cachePolicy == CachePolicyRevalidate || existingResource->mustRevalidateDueToCacheHeaders()) { I think ...
6 years, 8 months ago (2014-04-09 04:08:36 UTC) #3
Nate Chapin
On 2014/04/09 00:00:44, abarth wrote: > LGTM > > Do we have unit tests for ...
6 years, 8 months ago (2014-04-09 19:00:07 UTC) #4
Nate Chapin
On 2014/04/09 04:08:36, yhirano wrote: > https://codereview.chromium.org/229053004/diff/20001/Source/core/fetch/ResourceFetcher.cpp > File Source/core/fetch/ResourceFetcher.cpp (right): > > https://codereview.chromium.org/229053004/diff/20001/Source/core/fetch/ResourceFetcher.cpp#newcode953 > ...
6 years, 8 months ago (2014-04-09 19:08:50 UTC) #5
Nate Chapin
The CQ bit was checked by japhet@chromium.org
6 years, 8 months ago (2014-04-09 19:58:29 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/japhet@chromium.org/229053004/60001
6 years, 8 months ago (2014-04-09 19:58:42 UTC) #7
Nate Chapin
On 2014/04/09 19:00:07, Nate Chapin wrote: > On 2014/04/09 00:00:44, abarth wrote: > > LGTM ...
6 years, 8 months ago (2014-04-09 19:58:46 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-09 20:29:41 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_compile_dbg
6 years, 8 months ago (2014-04-09 20:29:42 UTC) #10
Nate Chapin
The CQ bit was checked by japhet@chromium.org
6 years, 8 months ago (2014-04-09 20:33:39 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/japhet@chromium.org/229053004/80001
6 years, 8 months ago (2014-04-09 20:33:40 UTC) #12
commit-bot: I haz the power
6 years, 8 months ago (2014-04-09 21:42:12 UTC) #13
Message was sent while issue was closed.
Change committed as 171178

Powered by Google App Engine
This is Rietveld 408576698