summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-03-07 12:10:36 +0100
committerJulius Härtl <jus@bitgrid.net>2018-03-07 15:09:43 +0100
commit50a9beb4bbcfc7baf2a832fef2f6fdf601d8219e (patch)
tree60372d7b8aa33968c652036bcccdbe285b20a1b4
parent8d865483f4dd98ea234ce392415679a84dda0d0f (diff)
downloadnextcloud-server-50a9beb4bbcfc7baf2a832fef2f6fdf601d8219e.tar.gz
nextcloud-server-50a9beb4bbcfc7baf2a832fef2f6fdf601d8219e.zip
Move base url from global cache prefix to frontend related ones
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--apps/theming/lib/ThemingDefaults.php2
-rw-r--r--lib/private/Server.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 94abb4e288a..79995f52efb 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -231,7 +231,7 @@ class ThemingDefaults extends \OC_Defaults {
* @return array scss variables to overwrite
*/
public function getScssVariables() {
- $cache = $this->cacheFactory->createDistributed('theming');
+ $cache = $this->cacheFactory->createDistributed('theming-' . $this->urlGenerator->getBaseUrl());
if ($value = $cache->get('getScssVariables')) {
return $value;
}
diff --git a/lib/private/Server.php b/lib/private/Server.php
index d586bab15b9..ed4eb7eb39f 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -498,7 +498,7 @@ class Server extends ServerContainer implements IServerContainer {
$version = implode(',', $v);
$instanceId = \OC_Util::getInstanceId();
$path = \OC::$SERVERROOT;
- $prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . $urlGenerator->getBaseUrl());
+ $prefix = md5($instanceId . '-' . $version . '-' . $path);
return new \OC\Memcache\Factory($prefix, $c->getLogger(),
$config->getSystemValue('memcache.local', null),
$config->getSystemValue('memcache.distributed', null),
@@ -965,7 +965,7 @@ class Server extends ServerContainer implements IServerContainer {
$c->getConfig(),
$c->getThemingDefaults(),
\OC::$SERVERROOT,
- $cacheFactory->createDistributed('SCSS')
+ $cacheFactory->createDistributed('SCSS-' . md5($this->getURLGenerator()->getBaseUrl()))
);
});
$this->registerService(JSCombiner::class, function (Server $c) {
@@ -974,7 +974,7 @@ class Server extends ServerContainer implements IServerContainer {
return new JSCombiner(
$c->getAppDataDir('js'),
$c->getURLGenerator(),
- $cacheFactory->createDistributed('JS'),
+ $cacheFactory->createDistributed('JS-' . md5($this->getURLGenerator()->getBaseUrl())),
$c->getSystemConfig(),
$c->getLogger()
);