[Interest] QNetworkDiskCache + QNetworkRequest::PreferNetwork = always cache

Alexander Dyagilev alervdvcw at gmail.com
Tue Jan 14 03:20:33 CET 2020


Hello,

Yes, I'm sure. Tested with Google Chrome browser - works fine there 
(i.e. the browser uses if-modified-since and server sends 304).

Qt does not try to refresh the resource once it gets downloaded into the 
cache.


On 1/14/2020 5:01 AM, Tony Rietwyk wrote:
> Hi Alexander,
>
> The wording for PreferNetwork in the help is a bit ambiguous:
>
>     "default value; load from the network if the cached entry is older 
> than the network entry."
>
> It reads as if a OPTION query has been done, giving "the network 
> entry" - but maybe it just relies on the cached page's cache headers.  
> Are you sure that the server is setting an expires timestamp, or 
> max-age correctly?
>
> Hope that helps,
>
> Tony
>
>
> On 14/01/2020 12:24 pm, Alexander Dyagilev wrote:
>> Well, yes, but this eliminates the whole idea :)
>>
>> On 1/14/2020 1:54 AM, Thiago Macieira wrote:
>>> On Sunday, 12 January 2020 22:34:24 PST Alexander Dyagilev wrote:
>>>> Hello,
>>>>
>>>> I've created a bug report: https://bugreports.qt.io/browse/QTBUG-81318
>>>>
>>>> Is there some workaround?...
>>> AlwaysNetwork
>>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest


More information about the Interest mailing list