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\Project;
|
||||
use App\Dto\QuerySettingsDto;
|
||||
use App\Dto\Builder\DocumentationVersion as DocumentationVersionBuilderDto;
|
||||
use App\Dto\Service\Admin\Project\DocumentationVersion\StoreUpdate;
|
||||
use App\Enums\CacheTag;
|
||||
use App\Enums\DocumentationVersionStatus;
|
||||
use App\Models\DocumentationVersion;
|
||||
use App\Models\User;
|
||||
@@ -141,7 +140,7 @@ final class DocumentationVersionService extends Service
|
||||
$dataVersion = $this->getDataVersion($data);
|
||||
return $this->documentationVersionCommandHandler->handleStore($project, $dataVersion);
|
||||
});
|
||||
$this->clearCacheCommandHandler->byTag(CacheTag::DocumantationVersion);
|
||||
$this->clearCacheCommandHandler->all();
|
||||
} catch (\Throwable $e) {
|
||||
report($e);
|
||||
return $this->errService(__('Server Error'));
|
||||
@@ -178,7 +177,7 @@ final class DocumentationVersionService extends Service
|
||||
$dataVersion = $this->getDataVersion($data);
|
||||
return $this->documentationVersionCommandHandler->handleUpdate($version, $dataVersion);
|
||||
});
|
||||
$this->clearCacheCommandHandler->byTag(CacheTag::DocumantationVersion);
|
||||
$this->clearCacheCommandHandler->all();
|
||||
} catch (\Throwable $e) {
|
||||
report($e);
|
||||
return $this->errService(__('Server Error'));
|
||||
@@ -207,7 +206,7 @@ final class DocumentationVersionService extends Service
|
||||
DB::transaction(function () use ($version) {
|
||||
$this->documentationVersionCommandHandler->handleDestroy($version);
|
||||
});
|
||||
$this->clearCacheCommandHandler->byTag(CacheTag::DocumantationVersion);
|
||||
$this->clearCacheCommandHandler->all();
|
||||
} catch (\Throwable $e) {
|
||||
report($e);
|
||||
return $this->errService(__('Server Error'));
|
||||
|
||||
Reference in New Issue
Block a user