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

Issue 743235 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Cronet HTTP_CACHE_DISK_NO_HTTP behavior is strange and not documented

Project Member Reported by mge...@chromium.org, Jul 14 2017

Issue description

Copying from  issue 740207 : Why does HTTP_CACHE_IN_MEMORY enable DNS cache but HTTP_CACHE_DISK_NO_HTTP doesn't? What is HTTP_CACHE_DISK_NO_HTTP even for? I read our documentation and it doesn't really say. Unfortunately this involves behavior way deep in the net stack and might be tricky to change.
 
> What is HTTP_CACHE_DISK_NO_HTTP even for?

I believe it's used for persisting things like QUIC server properties when an app doesn't want to cache HTTP responses (because they might be too large to be usefully cached or might always be uncachable or never refetched).

> Why does HTTP_CACHE_IN_MEMORY enable DNS cache but HTTP_CACHE_DISK_NO_HTTP doesn't?

I'd guess because the DNS cache mostly comes into play when processing HTTP requests, so disabling HTTP cache disables DNS cache.  I should mention that the DNS cache generally doesn't provide much benefit on Android.  I assume this is closely related to  Issue 621958  and internal b/27997533.

I agree we should add more documentation to both HTTP_CACHE_DISK_NO_HTTP and disableCache().
> I should mention that the DNS cache generally doesn't provide much benefit on Android.

For more verbose explanation see  crbug.com/621958#c3 , things may have changed since the stale cache work.

Comment 3 by mge...@chromium.org, Jul 17 2017

Thanks for pointing to that bug, I missed it. They're not quite the same bug but they have the same underlying cause. It's becoming more of an issue now with the stale DNS work.

Comment 4 by mge...@chromium.org, Nov 30 2017

Owner: mge...@chromium.org
Status: Assigned (was: Untriaged)

Comment 5 by mge...@chromium.org, Mar 23 2018

Status: Fixed (was: Assigned)
I fixed the "strange" part in https://crrev.com/c/976539. Not sure why it didn't update here.
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2a01b16799fefbbc30092cc6d79a0bb77db4221f

commit 2a01b16799fefbbc30092cc6d79a0bb77db4221f
Author: Miriam Gershenson <mgersh@chromium.org>
Date: Thu Mar 22 22:54:47 2018

Reduce load flags that affect the host cache

Previously, all three of the load flags that prevent use of the HTTP
cache also prevented use of the DNS cache when using the socket pools.
This is not the desired behavior for most consumers of those load flags.
LOAD_BYPASS_CACHE has some consumers that might be depending on the
behavior, so it stays the same. LOAD_DISABLE_CACHE and
LOAD_VALIDATE_CACHE will not affect the host cache.

Details: https://docs.google.com/document/d/1CuGd8ZnGd56L0wpX1jkB96Lm6IF9fF409h234AqjtNw/edit?usp=sharing

Bug:  743235 ,  621958 
Change-Id: I4560cc3bf96da2f19c10a5c68179d9294012f549
Reviewed-on: https://chromium-review.googlesource.com/976539
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Miriam Gershenson <mgersh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545279}
[modify] https://crrev.com/2a01b16799fefbbc30092cc6d79a0bb77db4221f/net/base/load_flags_list.h
[modify] https://crrev.com/2a01b16799fefbbc30092cc6d79a0bb77db4221f/net/http/http_network_transaction_unittest.cc
[modify] https://crrev.com/2a01b16799fefbbc30092cc6d79a0bb77db4221f/net/socket/client_socket_pool_manager.cc

Sign in to add a comment