diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-06-10 14:40:48 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-06-13 22:28:16 +0300 |
commit | 32e0b7beec8ee1229cc6b1b1a4b857a459547b55 (patch) | |
tree | 621de8c60442bfa3b07abbf0ac4c576fdb5da721 /platform/default/include/mbgl/storage/offline_database.hpp | |
parent | 427e6e7615ac6b6739b0ad830a3a18abd8b0ba21 (diff) | |
download | qtlocation-mapboxgl-32e0b7beec8ee1229cc6b1b1a4b857a459547b55.tar.gz |
[core] Add API for clearing tile cache
Diffstat (limited to 'platform/default/include/mbgl/storage/offline_database.hpp')
-rw-r--r-- | platform/default/include/mbgl/storage/offline_database.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/default/include/mbgl/storage/offline_database.hpp b/platform/default/include/mbgl/storage/offline_database.hpp index 3de829e635..4e9ffcf028 100644 --- a/platform/default/include/mbgl/storage/offline_database.hpp +++ b/platform/default/include/mbgl/storage/offline_database.hpp @@ -58,6 +58,11 @@ public: // lookup, it will not get downloaded again. std::exception_ptr invalidateTileCache(); + // Clear the tile 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. + std::exception_ptr clearTileCache(); + expected<OfflineRegions, std::exception_ptr> listRegions(); expected<OfflineRegion, std::exception_ptr> createRegion(const OfflineRegionDefinition&, |