FEATURE: cache most used SQL queries
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Module;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
class SetTemplate extends Command
|
||||
@@ -63,6 +64,9 @@ class SetTemplate extends Command
|
||||
return;
|
||||
}
|
||||
|
||||
// delete cached current template
|
||||
Cache::forget('current-template');
|
||||
|
||||
// theme written
|
||||
$this->line('Template successfully set up.');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user