]> git.openstreetmap.org Git - nominatim.git/commitdiff
set default osm2pgsql to 0 when using flatnode file
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 24 Nov 2019 13:36:36 +0000 (14:36 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 24 Nov 2019 13:36:36 +0000 (14:36 +0100)
lib/setup/SetupClass.php

index 2fdb3926d59ecc23d2f26ecc75e94776f3b81ca8..12a1bb0d7b6a7549c2dc0a772a2b6a216a0c8d9d 100755 (executable)
@@ -29,10 +29,13 @@ class SetupFunctions
             warn('resetting threads to '.$this->iInstances);
         }
 
-        // Assume we can steal all the cache memory in the box (unless told otherwise)
         if (isset($aCMDResult['osm2pgsql-cache'])) {
             $this->iCacheMemory = $aCMDResult['osm2pgsql-cache'];
+        } elseif (!is_null(CONST_Osm2pgsql_Flatnode_File)) {
+            // When flatnode files are enabled then disable cache per default.
+            $this->iCacheMemory = 0;
         } else {
+            // Otherwise: Assume we can steal all the cache memory in the box.
             $this->iCacheMemory = getCacheMemoryMB();
         }