X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0c483063dd7f5b62c28e10279e22250ec861fb8f..47714357cb800c69d006b3a868356bf80d09549a:/lib/setup/SetupClass.php?ds=sidebyside diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php index 2fdb3926..12a1bb0d 100755 --- a/lib/setup/SetupClass.php +++ b/lib/setup/SetupClass.php @@ -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(); }