@@ -47,7 +47,9 @@ |
||
47 | 47 | |
48 | 48 | $cache_object = $this->cache->setNamespace('dispatcherservice')->get($name); |
49 | 49 | |
50 | - if ( is_null($cache_object) ) return false; |
|
50 | + if ( is_null($cache_object) ) { |
|
51 | + return false; |
|
52 | + } |
|
51 | 53 | |
52 | 54 | $response->import($cache); |
53 | 55 |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | Cache $cache |
44 | 44 | ) { |
45 | 45 | |
46 | - $name = (string) $request->method . (string) $request->uri; |
|
46 | + $name = (string)$request->method.(string)$request->uri; |
|
47 | 47 | |
48 | 48 | $cache_object = $cache->setNamespace('dispatcherservice')->get($name); |
49 | 49 | |
50 | - if ( is_null($cache_object) ) return false; |
|
50 | + if (is_null($cache_object)) return false; |
|
51 | 51 | |
52 | 52 | $response->import($cache); |
53 | 53 | |
@@ -66,17 +66,17 @@ discard block |
||
66 | 66 | |
67 | 67 | $ttl = $route->getParameter('ttl'); |
68 | 68 | |
69 | - $name = (string) $request->method . (string) $request->uri; |
|
69 | + $name = (string)$request->method.(string)$request->uri; |
|
70 | 70 | |
71 | 71 | $method = $request->method->get(); |
72 | 72 | |
73 | 73 | $status = $response->status->get(); |
74 | 74 | |
75 | 75 | if ( |
76 | - ( $cache == 'SERVER' || $cache == 'BOTH' ) && |
|
76 | + ($cache == 'SERVER' || $cache == 'BOTH') && |
|
77 | 77 | in_array($method, self::$cachable_methods) && |
78 | 78 | in_array($status, self::$cachable_statuses) |
79 | - ){ |
|
79 | + ) { |
|
80 | 80 | |
81 | 81 | $cache->setNamespace('dispatcherservice')->set($name, $response->export(), $ttl); |
82 | 82 |