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:
parent
8d865483f4
commit
50a9beb4bb
|
@ -231,7 +231,7 @@ class ThemingDefaults extends \OC_Defaults {
|
||||||
* @return array scss variables to overwrite
|
* @return array scss variables to overwrite
|
||||||
*/
|
*/
|
||||||
public function getScssVariables() {
|
public function getScssVariables() {
|
||||||
$cache = $this->cacheFactory->createDistributed('theming');
|
$cache = $this->cacheFactory->createDistributed('theming-' . $this->urlGenerator->getBaseUrl());
|
||||||
if ($value = $cache->get('getScssVariables')) {
|
if ($value = $cache->get('getScssVariables')) {
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -498,7 +498,7 @@ class Server extends ServerContainer implements IServerContainer {
|
||||||
$version = implode(',', $v);
|
$version = implode(',', $v);
|
||||||
$instanceId = \OC_Util::getInstanceId();
|
$instanceId = \OC_Util::getInstanceId();
|
||||||
$path = \OC::$SERVERROOT;
|
$path = \OC::$SERVERROOT;
|
||||||
$prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . $urlGenerator->getBaseUrl());
|
$prefix = md5($instanceId . '-' . $version . '-' . $path);
|
||||||
return new \OC\Memcache\Factory($prefix, $c->getLogger(),
|
return new \OC\Memcache\Factory($prefix, $c->getLogger(),
|
||||||
$config->getSystemValue('memcache.local', null),
|
$config->getSystemValue('memcache.local', null),
|
||||||
$config->getSystemValue('memcache.distributed', null),
|
$config->getSystemValue('memcache.distributed', null),
|
||||||
|
@ -965,7 +965,7 @@ class Server extends ServerContainer implements IServerContainer {
|
||||||
$c->getConfig(),
|
$c->getConfig(),
|
||||||
$c->getThemingDefaults(),
|
$c->getThemingDefaults(),
|
||||||
\OC::$SERVERROOT,
|
\OC::$SERVERROOT,
|
||||||
$cacheFactory->createDistributed('SCSS')
|
$cacheFactory->createDistributed('SCSS-' . md5($this->getURLGenerator()->getBaseUrl()))
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
$this->registerService(JSCombiner::class, function (Server $c) {
|
$this->registerService(JSCombiner::class, function (Server $c) {
|
||||||
|
@ -974,7 +974,7 @@ class Server extends ServerContainer implements IServerContainer {
|
||||||
return new JSCombiner(
|
return new JSCombiner(
|
||||||
$c->getAppDataDir('js'),
|
$c->getAppDataDir('js'),
|
||||||
$c->getURLGenerator(),
|
$c->getURLGenerator(),
|
||||||
$cacheFactory->createDistributed('JS'),
|
$cacheFactory->createDistributed('JS-' . md5($this->getURLGenerator()->getBaseUrl())),
|
||||||
$c->getSystemConfig(),
|
$c->getSystemConfig(),
|
||||||
$c->getLogger()
|
$c->getLogger()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue