diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-13 16:47:36 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-14 13:46:03 -0800 |
commit | 2aafdbc1b84192d9a51ff7f5f9d9830e0951bb2a (patch) | |
tree | b43c6d0bbb86988628c611f21ba7d2cc15340c40 /platform/default/online_file_source.cpp | |
parent | 2ee1fe41786742332d190b01e28ba88a72c59f43 (diff) | |
download | qtlocation-mapboxgl-2aafdbc1b84192d9a51ff7f5f9d9830e0951bb2a.tar.gz |
[core] Add an explicit "not modified" indicator to Response
Diffstat (limited to 'platform/default/online_file_source.cpp')
-rw-r--r-- | platform/default/online_file_source.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/platform/default/online_file_source.cpp b/platform/default/online_file_source.cpp index 634a6710a7..657871b907 100644 --- a/platform/default/online_file_source.cpp +++ b/platform/default/online_file_source.cpp @@ -252,11 +252,7 @@ void OnlineFileRequestImpl::scheduleRealRequest(OnlineFileSource::Impl& impl, bo (!response_->error || (response_->error->reason == Response::Error::Reason::NotFound))) { // Store response in database. Make sure we only refresh the expires column if the data // didn't change. - SQLiteCache::Hint hint = SQLiteCache::Hint::Full; - if (response && response_->data == response->data) { - hint = SQLiteCache::Hint::Refresh; - } - impl.cache->put(resource, *response_, hint); + impl.cache->put(resource, *response_, response_->notModified ? SQLiteCache::Hint::Refresh : SQLiteCache::Hint::Full); } response = response_; |