diff --git a/Classes/Cache/StaticFileBackend.php b/Classes/Cache/StaticFileBackend.php index a11a92cdc78..30c583b2347 100644 --- a/Classes/Cache/StaticFileBackend.php +++ b/Classes/Cache/StaticFileBackend.php @@ -184,6 +184,7 @@ public function flush(): void $removeService = GeneralUtility::makeInstance(RemoveService::class); $removeService->subdirectories($absoluteCacheDir); parent::flush(); + $removeService->removeQueueDirectories(); } /** diff --git a/Classes/Service/RemoveService.php b/Classes/Service/RemoveService.php index 9875951e549..c2d0d9f6d20 100644 --- a/Classes/Service/RemoveService.php +++ b/Classes/Service/RemoveService.php @@ -20,6 +20,11 @@ class RemoveService extends AbstractService * Finally remove the dirs. */ public function __destruct() + { + $this->removeQueueDirectories(); + } + + public function removeQueueDirectories(): void { foreach ($this->removeDirs as $removeDir) { GeneralUtility::rmdir($removeDir, true); @@ -40,8 +45,7 @@ public function file(string $absoulteFileName): bool } /** - * Add the subdirecotries of thee given folder to the remove function. - * + * Add the subdirectories of the given folder to the remove function. */ public function subdirectories(string $absoluteDirName): self { @@ -62,7 +66,6 @@ public function subdirectories(string $absoluteDirName): self /** * Rename the dir and mark them as "to remove". * Speed up the remove process. - * */ public function directory(string $absoluteDirName): self {