From 5a6cee0dd0f90f8a3bfa79ebde2a4896b9eeaeea Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 23 Feb 2016 14:19:31 -0800 Subject: [PATCH] [core] Add a descriptive comment about maximumCacheSize --- include/mbgl/storage/default_file_source.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index d55e12b77..3e839bbc1 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -15,6 +15,13 @@ template class Thread; class DefaultFileSource : public FileSource { public: + /* + * The maximumCacheSize parameter is a limit applied to non-offline resources only, + * i.e. resources added to the database for the "ambient use" caching functionality. + * There is no size limit for offline resources. If a user never creates any offline + * regions, we want the database to remain fairly small (order tens or low hundreds + * of megabytes). + */ DefaultFileSource(const std::string& cachePath, const std::string& assetRoot, uint64_t maximumCacheSize = util::DEFAULT_MAX_CACHE_SIZE);