From 769344733abf4726a7e32f6321d79234c39b4285 Mon Sep 17 00:00:00 2001 From: Ryan Weaver Date: Sat, 15 Jan 2011 20:23:43 -0600 Subject: [PATCH] [Cache] Fixing a coding standard, adding a small note for clarity, and adding a missing type-hint. --- src/Symfony/Component/HttpKernel/Cache/Cache.php | 3 ++- src/Symfony/Component/HttpKernel/Cache/Store.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Cache/Cache.php b/src/Symfony/Component/HttpKernel/Cache/Cache.php index 19fbc3117b..e90ee81469 100644 --- a/src/Symfony/Component/HttpKernel/Cache/Cache.php +++ b/src/Symfony/Component/HttpKernel/Cache/Cache.php @@ -227,6 +227,7 @@ class Cache implements HttpKernelInterface */ protected function lookup(Request $request) { + // if allow_reload and no-cache Cache-Control, allow a cache reload if ($this->options['allow_reload'] && $request->isNoCache()) { $this->record($request, 'reload'); @@ -275,7 +276,7 @@ class Cache implements HttpKernelInterface * * @return Response A Response instance */ - protected function validate(Request $request, $entry) + protected function validate(Request $request, Response $entry) { $subRequest = clone $request; diff --git a/src/Symfony/Component/HttpKernel/Cache/Store.php b/src/Symfony/Component/HttpKernel/Cache/Store.php index 5c11811069..97d46700b6 100644 --- a/src/Symfony/Component/HttpKernel/Cache/Store.php +++ b/src/Symfony/Component/HttpKernel/Cache/Store.php @@ -108,8 +108,7 @@ class Store // find a cached entry that matches the request. $match = null; foreach ($entries as $entry) { - if ($this->requestsMatch(isset($entry[1]['vary']) ? $entry[1]['vary'][0] : '', $request->headers->all(), $entry[0])) - { + if ($this->requestsMatch(isset($entry[1]['vary']) ? $entry[1]['vary'][0] : '', $request->headers->all(), $entry[0])) { $match = $entry; break;