Shorter cache key for URL entries
This commit is contained in:
parent
e0998c27ff
commit
c3c491689b
|
@ -49,7 +49,7 @@ class CachingRouter extends Router {
|
||||||
*/
|
*/
|
||||||
public function generate($name, $parameters = array(), $absolute = false) {
|
public function generate($name, $parameters = array(), $absolute = false) {
|
||||||
asort($parameters);
|
asort($parameters);
|
||||||
$key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . json_encode($parameters) . intval($absolute);
|
$key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . sha1(json_encode($parameters)) . intval($absolute);
|
||||||
if ($this->cache->hasKey($key)) {
|
if ($this->cache->hasKey($key)) {
|
||||||
return $this->cache->get($key);
|
return $this->cache->get($key);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue