Skip to content

Commit d46ee41

Browse files
committed
Merge pull request #47 from aeyoll/fix-routing-key
Fix the routing key when using multiple hosts
2 parents 9630d4c + 15dd908 commit d46ee41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Routing/Matcher/CacheUrlMatcher.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ class CacheUrlMatcher extends UrlMatcher
3030
*/
3131
public function match($pathInfo)
3232
{
33-
$key = 'route_' . strtolower($this->context->getMethod()) . '_' . $pathInfo;
33+
$host = strtr($this->context->getHost(), '.', '_');
34+
$method = strtolower($this->context->getMethod());
35+
$key = 'route_' . $method . '_' . $host . '_' . $pathInfo;
36+
3437
if ($this->cache->contains($key)) {
3538
return $this->cache->fetch($key);
3639
}

0 commit comments

Comments
 (0)