Skip to content

Commit b440b0b

Browse files
committed
Fix issue with routing using invalid keys
1 parent 3f5a9e0 commit b440b0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Routing/CachingRouter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private function getCacheItemMatch($pathinfo)
125125
{
126126
/** @type RequestContext $c */
127127
$c = $this->getContext();
128-
$key = sprintf('routing:%s:%s:%s:%s', $c->getMethod(), $c->getHost(), $pathinfo, $c->getQueryString());
128+
$key = sprintf('%s__%s__%s__%s', $c->getMethod(), $c->getHost(), $pathinfo, $c->getQueryString());
129129

130130
return $this->getCacheItemFromKey($key, 'match');
131131
}
@@ -142,7 +142,7 @@ private function getCacheItemMatch($pathinfo)
142142
private function getCacheItemGenerate($name, array $parameters, $referenceType)
143143
{
144144
sort($parameters);
145-
$key = sprintf('generate:%s:%s:%s', $name, json_encode($parameters), $referenceType ? 'true' : 'false');
145+
$key = sprintf('%s.%s.%s', $name, $referenceType ? 'true' : 'false', json_encode($parameters));
146146

147147
return $this->getCacheItemFromKey($key, 'generate');
148148
}

0 commit comments

Comments
 (0)