Move base url from global cache prefix to frontend related ones

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-03-07 12:10:36 +01:00
parent d1547ee3b0
commit c4539c34c9
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -496,7 +496,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),
@ -963,7 +963,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) {
@ -972,7 +972,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()
);