[webkit-gtk] Webkit cache

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


Ooops, I forgot to add the link to the API docs:

Adrian Perez de Castro <aperez at igalia.com> writes:

> 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).

[1] http://webkitgtk.org/reference/webkit2gtk/unstable/WebKitWebContext.html#WebKitProcessModel

> 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.

-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/474851d3/attachment.sig>


More information about the webkit-gtk mailing list