From e983f1bfc849525e673129f85923da3a04658281 Mon Sep 17 00:00:00 2001 From: merdan Date: Tue, 22 Jun 2021 16:42:50 +0500 Subject: [PATCH] cache fix --- .../serenitynow/cacheroute/classes/RouteCacheMiddleware.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/serenitynow/cacheroute/classes/RouteCacheMiddleware.php b/plugins/serenitynow/cacheroute/classes/RouteCacheMiddleware.php index 8acf97541..9523976f9 100644 --- a/plugins/serenitynow/cacheroute/classes/RouteCacheMiddleware.php +++ b/plugins/serenitynow/cacheroute/classes/RouteCacheMiddleware.php @@ -33,11 +33,13 @@ class RouteCacheMiddleware { $cacheKey = $this->getCacheKey($request->url()); if (\Cache::has($cacheKey)) { + $content = \Cache::get($cacheKey); + if($content) return \Response::make($this->getCachedContent($cacheKey, $request, $content), 200); else - Log::error('blank cache',$content,$cacheKey); + \Cache::forget($cacheKey); } $response = $next($request);