summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-03-08 21:12:54 +0100
committerGitHub <noreply@github.com>2018-03-08 21:12:54 +0100
commit7a7c350a2d284f418a1e52d80bfaaaaff12330b0 (patch)
tree6081899002de29347a16f585425c71cb69c3c9d5 /apps
parent7e374200c4eef0e2b61076857acaed5fcdee286a (diff)
parent573b94076103b2f3740ee243a2089279600523d4 (diff)
downloadnextcloud-server-7a7c350a2d284f418a1e52d80bfaaaaff12330b0.tar.gz
nextcloud-server-7a7c350a2d284f418a1e52d80bfaaaaff12330b0.zip
Merge pull request #8716 from nextcloud/fix-cache-prefixing
Remove base url from global cache prefix
Diffstat (limited to 'apps')
-rw-r--r--apps/theming/lib/ThemingDefaults.php6
-rw-r--r--apps/theming/tests/ThemingDefaultsTest.php2
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 94abb4e288a..688878bb50a 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;
}
@@ -298,7 +298,7 @@ class ThemingDefaults extends \OC_Defaults {
* @return bool
*/
public function shouldReplaceIcons() {
- $cache = $this->cacheFactory->createDistributed('theming');
+ $cache = $this->cacheFactory->createDistributed('theming-' . $this->urlGenerator->getBaseUrl());
if($value = $cache->get('shouldReplaceIcons')) {
return (bool)$value;
}
@@ -320,7 +320,7 @@ class ThemingDefaults extends \OC_Defaults {
private function increaseCacheBuster() {
$cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0');
$this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1);
- $this->cacheFactory->createDistributed('theming')->clear('getScssVariables');
+ $this->cacheFactory->createDistributed('theming-')->clear('getScssVariables');
}
/**
diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php
index 36fe9d17b7c..2e1ad44b7aa 100644
--- a/apps/theming/tests/ThemingDefaultsTest.php
+++ b/apps/theming/tests/ThemingDefaultsTest.php
@@ -79,7 +79,7 @@ class ThemingDefaultsTest extends TestCase {
$this->cacheFactory
->expects($this->any())
->method('createDistributed')
- ->with('theming')
+ ->with('theming-')
->willReturn($this->cache);
$this->template = new ThemingDefaults(
$this->config,