diff --git a/src/Middlewares/CacheResponse.php b/src/Middlewares/CacheResponse.php index d7b3eb8..bab093c 100644 --- a/src/Middlewares/CacheResponse.php +++ b/src/Middlewares/CacheResponse.php @@ -60,13 +60,11 @@ protected function getCachedResponse(Request $request, array $tags = []): false| { try { $response = $this->responseCache->getCachedResponseFor($request, $tags); - } - catch (CouldNotUnserialize $exception) { + } catch (CouldNotUnserialize $exception) { throw $exception; - } - catch (Throwable $exception) { + } catch (Throwable $exception) { report("Unable to retrieve cached response when one was expected. Error: {$exception->getMessage()}"); - + return false; }