Skip to content

Commit 9630d4c

Browse files
committed
Merge pull request #46 from aeyoll/fix-routing-caching-with-fos-rest-bundle
Add the http method to the route caching key to make it work with FOSRestBundle
2 parents d673a01 + d72758b commit 9630d4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Routing/Matcher/CacheUrlMatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CacheUrlMatcher extends UrlMatcher
3030
*/
3131
public function match($pathInfo)
3232
{
33-
$key = 'route_' . $pathInfo;
33+
$key = 'route_' . strtolower($this->context->getMethod()) . '_' . $pathInfo;
3434
if ($this->cache->contains($key)) {
3535
return $this->cache->fetch($key);
3636
}

0 commit comments

Comments
 (0)