summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-12-14 23:41:51 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2019-12-14 23:41:54 +0100
commit935727864a9357b5edd4f0da3711b20016a1617e (patch)
treeafbaa58e0e783fb9267bdd33da31701339841c34 /src/Cache.cpp
parentReduce some include of Cache.h since it needs 11s on average (diff)
downloadnheko-935727864a9357b5edd4f0da3711b20016a1617e.tar.xz
Increase max cache size and remove const from lmdb constants
fixes compilation issues with last released lmdb++
Diffstat (limited to 'src/Cache.cpp')
-rw-r--r--src/Cache.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp
index e61d101e..ee53ffbd 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -37,13 +37,13 @@
 static const std::string CURRENT_CACHE_FORMAT_VERSION("2018.09.21");
 static const std::string SECRET("secret");
 
-static const lmdb::val NEXT_BATCH_KEY("next_batch");
-static const lmdb::val OLM_ACCOUNT_KEY("olm_account");
-static const lmdb::val CACHE_FORMAT_VERSION_KEY("cache_format_version");
+static lmdb::val NEXT_BATCH_KEY("next_batch");
+static lmdb::val OLM_ACCOUNT_KEY("olm_account");
+static lmdb::val CACHE_FORMAT_VERSION_KEY("cache_format_version");
 
 constexpr size_t MAX_RESTORED_MESSAGES = 30;
 
-constexpr auto DB_SIZE = 512UL * 1024UL * 1024UL; // 512 MB
+constexpr auto DB_SIZE = 512UL * 1024UL * 1024UL * 1024UL; // 512 GB
 constexpr auto MAX_DBS = 8092UL;
 
 //! Cache databases and their format.
@@ -2407,4 +2407,3 @@ from_json(const nlohmann::json &obj, MegolmSessionIndex &msg)
         msg.session_id = obj.at("session_id");
         msg.sender_key = obj.at("sender_key");
 }
-