The cache was not cleared when saving
Clearing the cache using tags did not work correctly. Had to abandon them.
This commit is contained in:
@@ -5,7 +5,6 @@ namespace App\Services\Admin;
|
||||
use App\Dto\Builder\Project as ProjectBuilderDto;
|
||||
use App\Dto\QuerySettingsDto;
|
||||
use App\Dto\Service\Admin\Project\StoreUpdate;
|
||||
use App\Enums\CacheTag;
|
||||
use App\Enums\Morph;
|
||||
use App\Models\Project;
|
||||
use App\Models\ProjectLanguage;
|
||||
@@ -134,7 +133,7 @@ final class ProjectService extends Service
|
||||
|
||||
return $project;
|
||||
});
|
||||
$this->clearCacheCommandHandler->byTag(CacheTag::Project);
|
||||
$this->clearCacheCommandHandler->all();
|
||||
} catch (\Throwable $e) {
|
||||
report($e);
|
||||
return $this->errService(__('Server Error'));
|
||||
@@ -177,7 +176,7 @@ final class ProjectService extends Service
|
||||
|
||||
return $project;
|
||||
});
|
||||
$this->clearCacheCommandHandler->byTag(CacheTag::Project);
|
||||
$this->clearCacheCommandHandler->all();
|
||||
} catch (\Throwable $e) {
|
||||
report($e);
|
||||
return $this->errService(__('Server Error'));
|
||||
@@ -202,7 +201,7 @@ final class ProjectService extends Service
|
||||
DB::transaction(function () use ($project) {
|
||||
$this->projectCommandHandler->handleDestroy($project);
|
||||
});
|
||||
$this->clearCacheCommandHandler->byTag(CacheTag::Project);
|
||||
$this->clearCacheCommandHandler->all();
|
||||
} catch (\Throwable $e) {
|
||||
report($e);
|
||||
return $this->errService(__('Server Error'));
|
||||
|
||||
Reference in New Issue
Block a user