[webkit-qt] How to set Cache mechanism of QNetworkAccessManager- PreferCache

Tarandeep Singh tarandeep at gmail.com
Mon Apr 12 14:05:57 PDT 2010


On Mon, Apr 12, 2010 at 1:26 PM, <siddharth.mathur at nokia.com> wrote:

> Tarandeep,
>
> Something like this....
>
>  request.setAttribute(QNetworkRequest::CacheLoadControlAttribute,
> QNetworkRequest::PreferCache);
>
>
where should I do this? I mean which class I need to reimplement? The
NetworkAccessManager class ?
which function I need to override?

Thanks,
Tarandeep


..where request is a QNetworkReply.
>
>
> Hope that helps,
> Siddharth
>
>
>
>
> ________________________________
>
>        From: webkit-qt-bounces at lists.webkit.org [mailto:
> webkit-qt-bounces at lists.webkit.org] On Behalf Of ext Tarandeep Singh
>        Sent: Monday, April 12, 2010 4:13 PM
>        To: webkit-qt at lists.webkit.org
>        Subject: [webkit-qt] How to set Cache mechanism of
> QNetworkAccessManager- PreferCache
>
>
>        Hi,
>
>        How can I set the caching mechanism of QNetworkAccessManager to
> QNetworkRequest::PreferCache.
>
>        I have implemented a cache class (it inherits the
> QAbstractNetworkCache) that stores resources (CSS, javascript) in a DB. I
> want to use the saved CSS, javascripts instead of getting them from network.
> But the default caching mechanism of QNetworkAccessManager is set to
> QNetworkRequest::PreferNetwork. How can I change it?
>
>        Thanks,
>        Tarandeep
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20100412/125cc3d8/attachment.html>


More information about the webkit-qt mailing list