RESOLVED FIXED 137489
[SOUP] [WK2] WebProcess and NetworkProcess initialization clears cache contents
https://bugs.webkit.org/show_bug.cgi?id=137489
Summary [SOUP] [WK2] WebProcess and NetworkProcess initialization clears cache contents
Sergio Villar Senin
Reported 2014-10-07 09:59:39 PDT
The method NetworkProcess::platformInitializeNetworkProcess() creates the SoupCache object and performs the soup_cache_load() to load the index in memory. Loading the index has some side effects like deleting as much resources as needed to get the cache size under the max_size restriction. The problem is that unless soup_cache_set_max_size() is called before soup_cache_load(), the later will use the default cache max size (50Mb IIRC). Should you have a different max_size, it won't matter because the cache was already loaded and the resources exceeding the capacity already wiped.
Attachments
Patch (3.63 KB, patch)
2014-10-10 09:56 PDT, Sergio Villar Senin
no flags
Sergio Villar Senin
Comment 1 2014-10-10 09:44:21 PDT
Actually the same happens with the WebProcess initialization.
Sergio Villar Senin
Comment 2 2014-10-10 09:56:42 PDT
Carlos Garcia Campos
Comment 3 2014-10-10 10:13:31 PDT
I guess resources will never be removed then? if load() is the only one doing that
Sergio Villar Senin
Comment 4 2014-10-12 01:56:21 PDT
(In reply to comment #3) > I guess resources will never be removed then? if load() is the only one doing that load() is not the one doing that. load() calls soup_cache_entry_insert() which is the one that makes room in the cache if there is not enough disk space to allocate the resource. soup_cache_entry_insert() is called for every single new resource. This means that old resources will be removed at any time once the cache is full.
WebKit Commit Bot
Comment 5 2014-10-12 02:32:12 PDT
Comment on attachment 239633 [details] Patch Clearing flags on attachment: 239633 Committed r174639: <http://trac.webkit.org/changeset/174639>
WebKit Commit Bot
Comment 6 2014-10-12 02:32:16 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.