File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -845,8 +845,6 @@ public function clearCache()
845845 // If the directory cannot be deleted, it is likely because it is not empty anymore due to lazy loading from
846846 // the storefront triggering new cache file creation.
847847 // This is expected behavior and is not a cause for concern. Deletable files were deleted as expected.
848- // To avoid errors on the storefront, we wrap the deletion in a try/catch block and silently handle any
849- // exceptions, allowing the process to continue smoothly.
850848 try {
851849 $ this ->_mediaDirectory ->delete ($ directory );
852850 // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
Original file line number Diff line number Diff line change @@ -517,8 +517,7 @@ public function testClearCache(): void
517517 /**
518518 * This test verifies that if the cache directory cannot be deleted because it is no longer empty (due to newly
519519 * cached files being created after the old ones were deleted), the cache clean method should handle the exception
520- * and complete the clean. This is expected behavior and is not a cause for concern.
521- * The test asserts that the cache cleaning process completes successfully even if the directory cannot be deleted.
520+ * and complete the clean successfully even if the directory cannot be deleted.
522521 *
523522 * @return void
524523 * @throws FileSystemException
You can’t perform that action at this time.
0 commit comments