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 8d865483f4
commit 50a9beb4bb
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

@ -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()
);