Skip to content
Snippets Groups Projects
Commit f2f5a53d authored by Andreas Fischer's avatar Andreas Fischer
Browse files

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
parents f2e5494e 7f77b080
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment