[Webkit-unassigned] [Bug 146041] [GTK] Reimplement webkit_web_context_clear_cache functionality.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 20 09:00:33 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146041

--- Comment #8 from Michael Catanzaro <mcatanzaro at igalia.com> ---
I forgot that this API is broken.

Anders, the problem is that WebProcess::deleteWebsiteData thinks the web process is only responsible for clearing the memory cache, which is true on Macs, but on the Soup port it is also needs to clear the soup disk cache if the network process is enabled. (Our thinking is to eventually mandate running the network process and get rid of the soup cache entirely, but that hasn't happened yet.) platformClearResourceCaches will only ever clear the disk cache on the soup port, and the code is in an ifdef, so platformClearResourceCaches(AllResourceCaches) is the right thing to do; the only other flag would be ResourceCaches::InMemoryResourceCachesOnly, which would cause the function to do nothing.

Alternatives:

* We could add a new function with a more specific name, but then we are just going to need another #ifdef in the header file.

* We could add a new platformClearDiskCache function, which would be a no-op on all other ports. This is my preference, since it avoids ifdefs in the cross-platform files.

* We could copypaste the contents of platformClearResourceCaches into the ifdef, but that rather defeats the purpose of having the platform functions.

* We could clear the disk cache in webkit_web_context_clear_cache, but that would leave WebProcess::deleteWebsiteData broken.

Regardless, we should change both WebProcess::deleteWebsiteData and WebProcess::deleteWebsiteDataForOrigins. Carlos, you fixed WebProcess::deleteWebsiteData, but it seems WebProcess::deleteWebsiteDataForOrigins is what the WebsiteDataManager uses.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150920/3c1bc35f/attachment.html>


More information about the webkit-unassigned mailing list