cache fix
This commit is contained in:
parent
05d084542f
commit
e983f1bfc8
|
|
@ -33,11 +33,13 @@ class RouteCacheMiddleware
|
||||||
{
|
{
|
||||||
$cacheKey = $this->getCacheKey($request->url());
|
$cacheKey = $this->getCacheKey($request->url());
|
||||||
if (\Cache::has($cacheKey)) {
|
if (\Cache::has($cacheKey)) {
|
||||||
|
|
||||||
$content = \Cache::get($cacheKey);
|
$content = \Cache::get($cacheKey);
|
||||||
|
|
||||||
if($content)
|
if($content)
|
||||||
return \Response::make($this->getCachedContent($cacheKey, $request, $content), 200);
|
return \Response::make($this->getCachedContent($cacheKey, $request, $content), 200);
|
||||||
else
|
else
|
||||||
Log::error('blank cache',$content,$cacheKey);
|
\Cache::forget($cacheKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = $next($request);
|
$response = $next($request);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue