Save towns as plain PHP File in cache folder

+ Also load them on install + on reload items
= better performance when in dev mode
This commit is contained in:
slawkens
2020-10-09 22:27:48 +02:00
parent 3090989dea
commit ab3912b378
6 changed files with 155 additions and 57 deletions

View File

@@ -32,4 +32,12 @@ if ($reload) {
else {
error(Weapons::getError());
}
$towns_start_time = microtime(true);
if (Towns::save()) {
success('Successfully loaded towns (in ' . round(microtime(true) - $towns_start_time, 4) . ' seconds).');
}
else {
error('Error: No towns found.');
}
}