[webkit-gtk] HTTP disk-cache support in multiprocess environment, bug 44261

Sergio Villar Senin svillar at igalia.com
Wed Oct 13 01:46:29 PDT 2010


En 13/10/10 07:35, singhGajendra singh escribiu:
> Hi, All.
> Just gone through patch submitted for
> Bug#44261(https://bugs.webkit.org/attachment.cgi?id=69810&action=prettypatch
> <https://bugs.webkit.org/attachment.cgi?id=69810&action=prettypatch>),
> which provides HTTP disk-cache support for GTK port. I would like to
> clear some of the doubts regarding my understanding .
> Please correct me where I found to be wrong.
> 
> 1) Per session one WebKitSoupCache is supported.
> 2) Applications have a choice to set different cache location, i.e two
> different application can set their own Cache.
> 3) Cache can be shared and private.
> 
> Now my doubt goes below:
> *Doubt::* two applications say X and Y(linked with webkit) shares same
> cache location, and both applications are running ,  each one would
> create its own WebKitSoupCache and loads "Soup.cache" file to create
> meta data.
>  Now If X and Y load same pages then how the synchronization would
> happen in in-memory data of WebKitSoupCache.

As I already wrote in the bug there won't be any kind of
synchronization. Both applications will share the same file, but when
trying to use it at the same time anything could happen.

>  I have pointed out some of the use cases where Sync is required.
> 1) X loads a page(url1)  and writes data into cache, and now if Y tries
> to load same page, it won't take benefit of loading from cache, but
> would load from network, as Y has already created it's WebkitSoupCache
> meta data, which doesn't have this info.
> 
> 2) Let say some page is already in cache, and then both X and Y get
> started, so both would have meta info of  cache page in their
> WebkitSoupCahe, but if X deletes the page as its cache size gets beyond
> the MAX limit(50MB) then cache info of Y stored in webkitSoupCache would
> be invalid.

Both of them will happen as you said. Those scenarios were not
considered during the development process. Take into account that the
http cache that is currently inside webkit is not meant to be there,
it's just a temporal fix while all this stuff does not land into
libsoup. So I don't think that there would be many situations like the
one you describe. Applications that will take advantage of that would be
mainly web browsers using webkitgtk, i.e, midori and epiphany.

BR


More information about the webkit-gtk mailing list