Browse Source

Move base url from global cache prefix to frontend related ones

Signed-off-by: Julius Härtl <jus@bitgrid.net>
tags/v14.0.0beta1
Julius Härtl 6 years ago
parent
commit
50a9beb4bb
No account linked to committer's email address
2 changed files with 4 additions and 4 deletions
  1. 1
    1
      apps/theming/lib/ThemingDefaults.php
  2. 3
    3
      lib/private/Server.php

+ 1
- 1
apps/theming/lib/ThemingDefaults.php 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;
}

+ 3
- 3
lib/private/Server.php 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()
);

Loading…
Cancel
Save