summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2019-06-14 16:53:09 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2019-06-18 16:26:51 +0300
commit78eeffe1717a37a91e6c59681421a20c52a4d003 (patch)
treeb81e50aba9dcf531a96c9f5a25d1f723b3f72cee /include
parent59e7b9a8780e282cf90ede7ae8e3b1affe1e684e (diff)
downloadqtlocation-mapboxgl-78eeffe1717a37a91e6c59681421a20c52a4d003.tar.gz
[core] Clear/Invalidate should also work on non-tile resources
These methods were only affecting tiles, but they should really work on every resource like style, glyphs, etc.
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/storage/default_file_source.hpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp
index 6a63007a96..ddbdab8cf3 100644
--- a/include/mbgl/storage/default_file_source.hpp
+++ b/include/mbgl/storage/default_file_source.hpp
@@ -195,24 +195,30 @@ public:
void resetDatabase(std::function<void (std::exception_ptr)>);
/*
- * Forces revalidation of tiles in the ambient cache.
+ * Forces revalidation of the ambient cache.
*
- * Forces Mapbox GL Native to revalidate tiles stored in the ambient
+ * Forces Mapbox GL Native to revalidate resources stored in the ambient
* cache with the tile server before using them, making sure they
* are the latest version. This is more efficient than cleaning the
- * cache because if the tile is considered valid after the server
+ * cache because if the resource is considered valid after the server
* lookup, it will not get downloaded again.
+ *
+ * Resources overlapping with offline regions will not be affected
+ * by this call.
*/
- void invalidateTileCache(std::function<void (std::exception_ptr)>);
+ void invalidateAmbientCache(std::function<void (std::exception_ptr)>);
/*
- * Erase tiles from the ambient cache, freeing storage space.
+ * Erase resources from the ambient cache, freeing storage space.
*
- * Erases the tile cache, freeing resources. This operation can be
+ * Erases the ambient cache, freeing resources. This operation can be
* potentially slow because it will trigger a VACUUM on SQLite,
* forcing the database to move pages on the filesystem.
+ *
+ * Resources overlapping with offline regions will not be affected
+ * by this call.
*/
- void clearTileCache(std::function<void (std::exception_ptr)>);
+ void clearAmbientCache(std::function<void (std::exception_ptr)>);
// For testing only.
void setOnlineStatus(bool);