Merge pull request #7988 from owncloud/routing-cache-webroot

Keep cached urls with different hostnames or baseurls seperate

* owncloud/routing-cache-webroot:
  Sort parameters and cast to int
  add delimiter between host and baseurl
  Keep cached urls with different hostnames or baseurls seperate
This commit is contained in:
Andreas Fischer 2014-04-20 18:27:23 +02:00
commit f2f5a53d36
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ class CachingRouter extends Router {
* @return string
*/
public function generate($name, $parameters = array(), $absolute = false) {
$key = $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 {