New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 644828 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Disable Cache option in DevTools clears MemoryCache only once; does not disable it

Project Member Reported by elawrence@chromium.org, Sep 7 2016

Issue description

Version: 55.0.2847.0
OS: Windows 7

What steps will reproduce the problem?
(1) Visit http://files.unity3d.com/alexsuvorov/bugs/chrome-revalidation/
(2) Click GET button a few times
(3) Open DevTools Network panel
(4) Observe only first click on GET shows an item in the Dev Tools Network request list
(5) Ensure Disable Cache checkbox is ticked
(6) Observe only first click after setting disable cache shows an item in the Dev Tools Network request list. Subsequent requests return cached results.

What is the expected output?
When "Disable Cache" is set, memory cache is not hit

What do you see instead?
"Disable Cache" does not disable the memory cache, it simply clears it one time (https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp?q=cacheDisabled&sq=package:chromium&l=1126&dr=CSs) with a call to memoryCache()->evictResources();
 
[Possible fix]
Add to InspectorNetworkAgent::willSendRequest() the lines:

  if (m_state->booleanProperty(NetworkAgentState::cacheDisabled, false))
    memoryCache()->evictResources();



 
Owner: allada@chromium.org
Status: Assigned (was: Untriaged)
thanks eric!

allada, you were looking at this exact thing, yeah?

Comment 2 by allada@chromium.org, Sep 12 2016

Yes this is what I was working on until this blocked me:
https://codereview.chromium.org/2274233002/

I think it's more important to have a UI prepared for this before we make this change. I think it will much more of a nuisance if we disable memory cache without a better way to represent it.
Cc: samccone@google.com
Labels: Hotlist-Polish
I think a way we can accomplish this is by clearing cache on reload/page navigation if disable cache is checked.
In the original repro of this bug, I don't think the proposal in #4 would help, because the retrieval is taking place via an XmlHttpRequest. As such, clearing the memory cache only on reload or navigation wouldn't help. 

Having said that, a change elsewhere means that the steps in #0 no longer reproduce this problem, but it's not clear to me that this really means XHR will never hit the MemoryCache...
Status: Archived (was: Assigned)

Sign in to add a comment