deleteDirectory($rendition->directory()); } catch (Throwable $exception) { // Everything rebuilds itself lazily on the next request, so // a storage hiccup here means "some stale images survive", // not "the settings change failed" — and the person who just // saved a setting should not get a 500 for it. Per rendition // rather than around the loop, so one failing directory does // not leave the others unflushed. Log::warning("Could not flush the {$rendition->value} cache: ".$exception->getMessage()); } } } }