Skip to content

Commit

Permalink
wms provider: ignore cache on getcapabilities request with forced ref…
Browse files Browse the repository at this point in the history
…resh (followup 9c340d7)
  • Loading branch information
jef-n committed Dec 10, 2015
1 parent 89b9b67 commit 29a3c64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/wms/qgswmscapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,7 @@ bool QgsWmsCapabilitiesDownload::downloadCapabilities()
QgsMessageLog::logMessage( mError, tr( "WMS" ) );
return false;
}
request.setAttribute( QNetworkRequest::CacheLoadControlAttribute, mForceRefresh ? QNetworkRequest::PreferNetwork : QNetworkRequest::PreferCache );
request.setAttribute( QNetworkRequest::CacheLoadControlAttribute, mForceRefresh ? QNetworkRequest::AlwaysNetwork : QNetworkRequest::PreferCache );
request.setAttribute( QNetworkRequest::CacheSaveControlAttribute, true );

connect( QgsNetworkAccessManager::instance(), SIGNAL( requestSent( QNetworkReply *, QObject * ) ),
Expand Down Expand Up @@ -2021,7 +2021,7 @@ void QgsWmsCapabilitiesDownload::capabilitiesReplyFinished()
emit downloadFinished();
return;
}
request.setAttribute( QNetworkRequest::CacheLoadControlAttribute, mForceRefresh ? QNetworkRequest::PreferNetwork : QNetworkRequest::PreferCache );
request.setAttribute( QNetworkRequest::CacheLoadControlAttribute, mForceRefresh ? QNetworkRequest::AlwaysNetwork : QNetworkRequest::PreferCache );
request.setAttribute( QNetworkRequest::CacheSaveControlAttribute, true );

mCapabilitiesReply->deleteLater();
Expand Down

0 comments on commit 29a3c64

Please sign in to comment.