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()
845
845
// If the directory cannot be deleted, it is likely because it is not empty anymore due to lazy loading from
846
846
// the storefront triggering new cache file creation.
847
847
// 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.
850
848
try {
851
849
$ this ->_mediaDirectory ->delete ($ directory );
852
850
// phpcs:ignore Magento2.CodeAnalysis.EmptyBlock.DetectedCatch
Original file line number Diff line number Diff line change @@ -517,8 +517,7 @@ public function testClearCache(): void
517
517
/**
518
518
* This test verifies that if the cache directory cannot be deleted because it is no longer empty (due to newly
519
519
* 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.
522
521
*
523
522
* @return void
524
523
* @throws FileSystemException
You can’t perform that action at this time.
0 commit comments