Bug 142821 - [GTK][WK2] The WebKit network disk cache is not enabled
Summary: [GTK][WK2] The WebKit network disk cache is not enabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 141702 141703 142818 (view as bug list)
Depends on: 143872 144251 144542
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-18 05:21 PDT by Marcos Chavarría Teijeiro (irc: chavaone)
Modified: 2015-05-06 02:14 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.53 KB, patch)
2015-05-05 03:05 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos Chavarría Teijeiro (irc: chavaone) 2015-03-18 05:21:59 PDT
The http/tests/cache/disk-cache-validation.html layout test is failing on GTK+ since r179449 (http://trac.webkit.org/changeset/179449).

This test enables the tests for cache funcionality.

The output is the following:

FAIL: Timed out waiting for notifyDone to be called
Comment 1 Chris Dumez 2015-03-23 14:18:06 PDT
*** Bug 141702 has been marked as a duplicate of this bug. ***
Comment 2 Chris Dumez 2015-03-23 14:18:24 PDT
*** Bug 141703 has been marked as a duplicate of this bug. ***
Comment 3 Chris Dumez 2015-03-23 14:18:47 PDT
*** Bug 142818 has been marked as a duplicate of this bug. ***
Comment 4 Chris Dumez 2015-03-23 14:20:39 PDT
Will consolidate the GTK TestExpectations via https://bugs.webkit.org/show_bug.cgi?id=142979.
Comment 5 Carlos Alberto Lopez Perez 2015-03-25 04:49:22 PDT
Mac has recently enabled NETWORK_CACHE (See bug 30322) by default on r179449 <ttp://trac.webkit.org/changeset/179449>

Should GTK also enable it?
Comment 6 Carlos Garcia Campos 2015-03-25 04:53:06 PDT
(In reply to comment #5)
> Mac has recently enabled NETWORK_CACHE (See bug 30322) by default on r179449
> <ttp://trac.webkit.org/changeset/179449>
> 
> Should GTK also enable it?

We first need to implement it :-) We also need to figure out what to do with the single web process model, I guess we could keep using the soup cache in the web process and the WebKit cache in the network process. Or we could make the single web process model become a multiple web process model with limit = 1, and the network process will always be used.
Comment 7 Michael Catanzaro 2015-03-25 05:36:28 PDT
(In reply to comment #6)
> Or we could
> make the single web process model become a multiple web process model with
> limit = 1, and the network process will always be used.

Note that a properly-sandboxed web process would not have any access to the network, so mandatory network process is something we'd come to eventually anyway. (Also, it would make Apple happy, but you know that.)
Comment 8 Zan Dobersek 2015-03-25 05:37:15 PDT
These are the slides from Antti's talk at the WK Contributors Meeting.
https://trac.webkit.org/attachment/wiki/March%202015%20Meeting/Disk%20cache.pdf

The main requirements are implementing NetworkCache::IOChannel and NetworkCache::Data. In GLib/GIO this might be possible by using GFile and GMemoryInputStream/GMemoryOutputStream (or whatever best replicates dispatch_io_* and dispatch_data_* APIs).
Comment 9 Michael Catanzaro 2015-03-25 07:36:42 PDT
(In reply to comment #6)
> We first need to implement it :-) We also need to figure out what to do with
> the single web process model, I guess we could keep using the soup cache in
> the web process and the WebKit cache in the network process. Or we could
> make the single web process model become a multiple web process model with
> limit = 1, and the network process will always be used.

Mandatory network process is something I would be willing to implement, for bug #140075.
Comment 10 Carlos Garcia Campos 2015-03-25 07:43:41 PDT
(In reply to comment #9)
> (In reply to comment #6)
> > We first need to implement it :-) We also need to figure out what to do with
> > the single web process model, I guess we could keep using the soup cache in
> > the web process and the WebKit cache in the network process. Or we could
> > make the single web process model become a multiple web process model with
> > limit = 1, and the network process will always be used.
> 
> Mandatory network process is something I would be willing to implement, for
> bug #140075.

The question is whether sandboxing will be mandatory as well, or just optional. There are use cases in embedded world where network process, caches, and sandboxing are not needed at all.
Comment 11 Carlos Garcia Campos 2015-04-27 01:24:47 PDT
The initial implementation of the disk cache for soup landed in r183387. It works and all tests pass, but it hasn't been extensively tested yet. It can still be improved by using shareable resources, for example, but the only blocker is bug #144251 (to ensure all cache files are created with a creation time). So, I would like to enable the disk cache as soon as bug #144251 is fixed, so that we can start testing it now (early in the release cycle).
Comment 12 Carlos Garcia Campos 2015-05-05 03:05:01 PDT
Created attachment 252373 [details]
Patch

No more blockers, we are ready.
Comment 13 Martin Robinson 2015-05-05 07:39:55 PDT
Comment on attachment 252373 [details]
Patch

Nice.
Comment 14 Carlos Garcia Campos 2015-05-06 02:14:08 PDT
Committed r183865: <http://trac.webkit.org/changeset/183865>