FEATURE: cache most used SQL queries

This commit is contained in:
Michal Kváček
2017-02-22 01:40:26 +01:00
parent cad205960d
commit f3b1951d25
10 changed files with 74 additions and 35 deletions
+5
View File
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
use App\Models\Module;
use Illuminate\Console\Command;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\File;
use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Routing\Exception\MissingMandatoryParametersException;
@@ -63,6 +64,10 @@ class InstallModule extends Command
// all mandatory fields are present, we can write it into database and create modules.json
$this->installModule($config);
// delete cache
Cache::forget('enabled-modules');
Cache::forget('module-handler-to-id-enumeration');
// inform user
$this->line('Module ' . $name . ' successfuly installed');
}