| @@ 27-36 (lines=10) @@ | ||
| 24 | /** |
|
| 25 | * {@inheritdoc} |
|
| 26 | */ |
|
| 27 | public function fetch(RequestInterface $request) |
|
| 28 | { |
|
| 29 | $key = $this->namingStrategy->filename($request); |
|
| 30 | ||
| 31 | if ($this->cache->contains($key)) { |
|
| 32 | $data = $this->cache->fetch($key); |
|
| 33 | ||
| 34 | return new Response($data['status'], $data['headers'], $data['body'], $data['version'], $data['reason']); |
|
| 35 | } |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * {@inheritdoc} |
|
| @@ 27-38 (lines=12) @@ | ||
| 24 | /** |
|
| 25 | * {@inheritdoc} |
|
| 26 | */ |
|
| 27 | public function fetch(RequestInterface $request) |
|
| 28 | { |
|
| 29 | $key = $this->namingStrategy->filename($request); |
|
| 30 | ||
| 31 | $item = $this->cache->getItem($key); |
|
| 32 | ||
| 33 | if ($item->isHit()) { |
|
| 34 | $data = $item->get(); |
|
| 35 | ||
| 36 | return new Response($data['status'], $data['headers'], $data['body'], $data['version'], $data['reason']); |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * {@inheritdoc} |
|