diff OrthancServer/Sources/main.cpp @ 4792:434843934307 storage-cache

Added a StorageCache in the StorageAccessor
author Alain Mazy <am@osimis.io>
date Thu, 30 Sep 2021 12:14:19 +0200
parents ec8aef42a7db
children 7afbb54bd028
line wrap: on
line diff
--- a/OrthancServer/Sources/main.cpp	Tue Sep 14 14:51:12 2021 +0200
+++ b/OrthancServer/Sources/main.cpp	Thu Sep 30 12:14:19 2021 +0200
@@ -1521,6 +1521,16 @@
     {
       context.GetIndex().SetMaximumStorageSize(0);
     }
+
+    try
+    {
+      uint64_t size = lock.GetConfiguration().GetUnsignedIntegerParameter("MaximumStorageCacheSize", 128);
+      context.SetMaximumStorageCacheSize(size * 1024 * 1024);
+    }
+    catch (...)
+    {
+      context.SetMaximumStorageCacheSize(128);
+    }
   }
 
   {