diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-12-14 11:16:01 -0800 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-12-27 18:15:33 +0200 |
commit | 6d0b01c5fb1e0740ea48566fea200f03b979c52c (patch) | |
tree | 1ef2b3f41a35188079c766d47bf8abaffa9945ff /platform/linux | |
parent | 225eda4fff542918580c838f1cafa301ca7ea6fb (diff) | |
download | qtlocation-mapboxgl-6d0b01c5fb1e0740ea48566fea200f03b979c52c.tar.gz |
[core] Make it possible to limit the size of the SQLite cache
Diffstat (limited to 'platform/linux')
-rw-r--r-- | platform/linux/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/linux/main.cpp b/platform/linux/main.cpp index bb571a0093..45f2b8defa 100644 --- a/platform/linux/main.cpp +++ b/platform/linux/main.cpp @@ -107,6 +107,9 @@ int main(int argc, char *argv[]) { view = std::make_unique<GLFWView>(fullscreen, benchmark); mbgl::SQLiteCache cache("/tmp/mbgl-cache.db"); + cache.setMaximumCacheEntrySize(1 * 1024 * 1024); // 1 MB + cache.setMaximumCacheSize(50 * 1024 * 1024); // 50 MB + mbgl::DefaultFileSource fileSource(&cache); // Set access token if present |