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.
Actually the same happens with the WebProcess initialization.
Created attachment 239633 [details]
I guess resources will never be removed then? if load() is the only one doing that
(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.
Comment on attachment 239633 [details]
Clearing flags on attachment: 239633
Committed r174639: <http://trac.webkit.org/changeset/174639>
All reviewed patches have been landed. Closing bug.