diff options
author | Julius Härtl <jus@bitgrid.net> | 2017-06-15 12:35:16 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2017-06-15 12:46:24 +0200 |
commit | 0789adaf95d2cfea8d661812b7dd964b0611495b (patch) | |
tree | 1837c8826c3b20fa78c5e3a9d4b42202974923b2 /lib/private/Server.php | |
parent | ca3c69c8ae0fd7f0d13e87d7861c54e2950a2c09 (diff) | |
download | nextcloud-server-0789adaf95d2cfea8d661812b7dd964b0611495b.tar.gz nextcloud-server-0789adaf95d2cfea8d661812b7dd964b0611495b.zip |
Make cache and scss caching depend on the baseUrl
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 75e9d911632..081bee3d2ba 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -433,7 +433,13 @@ class Server extends ServerContainer implements IServerContainer { $this->registerAlias('UserCache', \OCP\ICache::class); $this->registerService(Factory::class, function (Server $c) { + $arrayCacheFactory = new \OC\Memcache\Factory('', $c->getLogger(), + '\\OC\\Memcache\\ArrayCache', + '\\OC\\Memcache\\ArrayCache', + '\\OC\\Memcache\\ArrayCache' + ); $config = $c->getConfig(); + $urlGenerator = new URLGenerator($config, $arrayCacheFactory); if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { $v = \OC_App::getAppVersions(); @@ -441,19 +447,15 @@ class Server extends ServerContainer implements IServerContainer { $version = implode(',', $v); $instanceId = \OC_Util::getInstanceId(); $path = \OC::$SERVERROOT; - $prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . \OC::$WEBROOT); + $prefix = md5($instanceId . '-' . $version . '-' . $path . '-' . $urlGenerator->getBaseUrl()); return new \OC\Memcache\Factory($prefix, $c->getLogger(), $config->getSystemValue('memcache.local', null), $config->getSystemValue('memcache.distributed', null), $config->getSystemValue('memcache.locking', null) ); } + return $arrayCacheFactory; - return new \OC\Memcache\Factory('', $c->getLogger(), - '\\OC\\Memcache\\ArrayCache', - '\\OC\\Memcache\\ArrayCache', - '\\OC\\Memcache\\ArrayCache' - ); }); $this->registerAlias('MemCacheFactory', Factory::class); $this->registerAlias(ICacheFactory::class, Factory::class); |