[webkit-dev] Doubts on QNetworkAccessManager
apedralho at gmail.com
Tue Nov 11 05:29:11 PST 2008
thanks for your elucidations and sorry if I'm being newbie with my
questions. Follows some more ones:
On Fri, Nov 7, 2008 at 5:19 PM, Benjamin Meyer <ben at meyerhome.net> wrote:
> On Nov 3, 2008, at 11:34 AM, André Pedralho wrote:
> Hi all,
>> I'm using the new QNetworkAccessManager to set my QtWebkit browser cache
>> system and realized that I can have more than one QWebPage loaded and then
>> (I guess) more than one QNetworkAccessManager as well.
>> What happens when I call, for example, something like
>> page.networkAccessManager().cache().clear() ?
> That cache object that the network access manager has a pointer to is
> Will it clear all the cache or just the cache related the page?
> The default NetworkCache objects do not know about each other so only one
> cache object is cleared.
Wouldn't be better to have this kind of functionalities in the QWebView
>> class? Maybe something like QWebSettings. Actually, IMHO we could have
>> access to the cache settings from QWebSettings.
> QWebSettings is for settings, not to hold cache objects
> Is there any other way to clear the cache?
> Using the clear function on the cache is the proper way. What you are
> probably looking for is to share the same network access manager with all
> your pages. Then you only have one cache. For an example of this checkout
> the source code for Arora.
Got it! So if I don't set a new global network access manager and want to
clear the cache I would need to go page by page clearing them, right?
What is the advantage on having one separated cache for each page? Wouldn't
be better to have one network access manager shared by default? Or maybe a
way to set WebKit to share them.
BTW, Arora is a great reference browser!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev