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:
2025-08-22 16:14:22 +05:00
parent 4049f9df53
commit 224240708d
12 changed files with 25 additions and 49 deletions
@@ -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'));