Sort parameters and cast to int
This commit is contained in:
parent
51fbf0bcbc
commit
7f77b08098
1 changed files with 2 additions and 1 deletions
|
@ -31,7 +31,8 @@ class CachingRouter extends Router {
|
|||
* @return string
|
||||
*/
|
||||
public function generate($name, $parameters = array(), $absolute = false) {
|
||||
$key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . $absolute;
|
||||
sort($parameters);
|
||||
$key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . intval($absolute);
|
||||
if ($this->cache->hasKey($key)) {
|
||||
return $this->cache->get($key);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue