[webkit-gtk] Webkit cache

Adrian Perez de Castro aperez at igalia.com
Wed Feb 26 05:04:38 PST 2014


Sergio Villar Senin <svillar at igalia.com> writes:

> En 25/02/14 20:26, Niranjan Rao escribiu:
>> Greetings,
>> 
>> My understanding is 2.2.3 does not have network process. If you are
>> running multiple processes, what is the recommended way to use cache? We
>> could certainly use the benefits of cache, but scared to make it shared
>> between multiple processes because of possibility of processes stepping
>> on each other shoes. Right now, I have set it up to use process specific
>> cache.
>> 
>> These processes are driven mercilessly by the driver. Chances of more
>> processes making network calls at same time are much higher and I am
>> afraid it might corrupt cache database.
>
> Not sure which cache you're talking about, but if you mean the on-disk
> http cache from libsoup, then that cache is not going to work if more
> than one process tries to use it.
>
> AFAIK, in WebKitGtk we only support multi-webprocess with network
> process enabled.

Sergio is right: WebKitGTK+ enables the network-process when using
WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES [1] because it
is not be safe to access the on-disk cache from multiple processes
at the same time (accessing cookie jars has the same problem, too).

With the network-process enabled, web-processes do not directly
access the network or the on-disk cache: instead they ask the
network-process to fetch resources for them. This way only one
process is accessing the caches on-disk (the network-process).

I hope this clarifies why the network-process is needed — and why
it is not a problem for the on-disk caches to enable it, but an
actual need.

Cheers,


-Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20140226/f33cf9cd/attachment.sig>


More information about the webkit-gtk mailing list