diff --git a/src/Cache.cpp b/src/Cache.cpp
index 2e02a488094dd18701c55c4ea008fbdf45a24288..e73f775435404af6d39fb9e61c8eafb044f2db29 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -45,7 +45,7 @@ static lmdb::val CACHE_FORMAT_VERSION_KEY("cache_format_version");
 
 constexpr size_t MAX_RESTORED_MESSAGES = 30;
 
-constexpr auto DB_SIZE = 32UL * 1024UL * 1024UL * 1024UL; // 512 GB
+constexpr auto DB_SIZE = 32UL * 1024UL * 1024UL * 1024ULL; // 32 GB
 constexpr auto MAX_DBS = 8092UL;
 
 //! Cache databases and their format.