mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:18:52 +02:00
Use resource cache as long as it is no older than network resource.
This allows chache to be used when cdn provides different values for get-vs-head, or for cdn with different resource times in different requests of different sessions.
This commit is contained in:
parent
17e3f3b48d
commit
aed165809c
1 changed files with 1 additions and 1 deletions
|
@ -350,7 +350,7 @@ void Resource::maybeRefresh() {
|
||||||
QDateTime lastModified = variant.value<QDateTime>();
|
QDateTime lastModified = variant.value<QDateTime>();
|
||||||
QDateTime lastModifiedOld = metaData.lastModified();
|
QDateTime lastModifiedOld = metaData.lastModified();
|
||||||
if (lastModified.isValid() && lastModifiedOld.isValid() &&
|
if (lastModified.isValid() && lastModifiedOld.isValid() &&
|
||||||
lastModifiedOld == lastModified) {
|
lastModifiedOld >= lastModified) {
|
||||||
qCDebug(networking) << "Using cached version of" << _url.fileName();
|
qCDebug(networking) << "Using cached version of" << _url.fileName();
|
||||||
// We don't need to update, return
|
// We don't need to update, return
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue