Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-12-15 13:31:13 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2017-12-18 22:57:11 +0300
commitd2d73f1ce8733623a780db62427c61ff007b33cb (patch)
tree4f8b0497b30a2d86b3b216eaf378b71d6a37e7ab
parent5ce943aa8501d6a7240175a934858c26f267f7ca (diff)
Also replace all other occurences
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
-rw-r--r--apps/files_sharing/lib/External/Storage.php2
-rw-r--r--apps/theming/lib/ThemingDefaults.php6
-rw-r--r--apps/user_ldap/lib/Proxy.php2
-rw-r--r--core/Command/Maintenance/UpdateTheme.php2
-rw-r--r--lib/private/App/AppManager.php2
-rw-r--r--lib/private/Files/ObjectStore/Swift.php2
-rw-r--r--lib/private/IntegrityCheck/Checker.php2
-rw-r--r--lib/private/OCS/DiscoveryService.php2
-rw-r--r--lib/private/Security/RateLimiting/Backend/MemoryCache.php2
-rw-r--r--lib/private/Server.php2
-rw-r--r--lib/private/TemplateLayout.php2
-rw-r--r--lib/private/URLGenerator.php2
-rw-r--r--lib/private/legacy/helper.php2
-rw-r--r--settings/ajax/uninstallapp.php4
14 files changed, 17 insertions, 17 deletions
diff --git a/apps/files_sharing/lib/External/Storage.php b/apps/files_sharing/lib/External/Storage.php
index bae24e89e64..638f82f7027 100644
--- a/apps/files_sharing/lib/External/Storage.php
+++ b/apps/files_sharing/lib/External/Storage.php
@@ -261,7 +261,7 @@ class Storage extends DAV implements ISharedStorage {
* @return bool
*/
private function testRemoteUrl($url) {
- $cache = $this->memcacheFactory->create('files_sharing_remote_url');
+ $cache = $this->memcacheFactory->createDistributed('files_sharing_remote_url');
if($cache->hasKey($url)) {
return (bool)$cache->get($url);
}
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index fa43dd50ccd..05d387e6273 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -240,7 +240,7 @@ class ThemingDefaults extends \OC_Defaults {
* @return array scss variables to overwrite
*/
public function getScssVariables() {
- $cache = $this->cacheFactory->create('theming');
+ $cache = $this->cacheFactory->createDistributed('theming');
if ($value = $cache->get('getScssVariables')) {
return $value;
}
@@ -307,7 +307,7 @@ class ThemingDefaults extends \OC_Defaults {
* @return bool
*/
public function shouldReplaceIcons() {
- $cache = $this->cacheFactory->create('theming');
+ $cache = $this->cacheFactory->createDistributed('theming');
if($value = $cache->get('shouldReplaceIcons')) {
return (bool)$value;
}
@@ -329,7 +329,7 @@ class ThemingDefaults extends \OC_Defaults {
private function increaseCacheBuster() {
$cacheBusterKey = $this->config->getAppValue('theming', 'cachebuster', '0');
$this->config->setAppValue('theming', 'cachebuster', (int)$cacheBusterKey+1);
- $this->cacheFactory->create('theming')->clear('getScssVariables');
+ $this->cacheFactory->createDistributed('theming')->clear('getScssVariables');
}
/**
diff --git a/apps/user_ldap/lib/Proxy.php b/apps/user_ldap/lib/Proxy.php
index d372ff9c026..dc8c6fc77cc 100644
--- a/apps/user_ldap/lib/Proxy.php
+++ b/apps/user_ldap/lib/Proxy.php
@@ -50,7 +50,7 @@ abstract class Proxy {
$this->ldap = $ldap;
$memcache = \OC::$server->getMemCacheFactory();
if($memcache->isAvailable()) {
- $this->cache = $memcache->create();
+ $this->cache = $memcache->createDistributed();
}
}
diff --git a/core/Command/Maintenance/UpdateTheme.php b/core/Command/Maintenance/UpdateTheme.php
index cf015b82635..2ab66a4ce75 100644
--- a/core/Command/Maintenance/UpdateTheme.php
+++ b/core/Command/Maintenance/UpdateTheme.php
@@ -57,7 +57,7 @@ class UpdateTheme extends UpdateJS {
parent::execute($input, $output);
// cleanup image cache
- $c = $this->cacheFactory->create('imagePath');
+ $c = $this->cacheFactory->createDistributed('imagePath');
$c->clear('');
$output->writeln('<info>Image cache cleared');
}
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php
index 6be892b7f49..e7d4668931c 100644
--- a/lib/private/App/AppManager.php
+++ b/lib/private/App/AppManager.php
@@ -306,7 +306,7 @@ class AppManager implements IAppManager {
* Clear the cached list of apps when enabling/disabling an app
*/
public function clearAppsCache() {
- $settingsMemCache = $this->memCacheFactory->create('settings');
+ $settingsMemCache = $this->memCacheFactory->createDistributed('settings');
$settingsMemCache->clear('listApps');
}
diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php
index ecfbe136e4c..629fb3ba7ff 100644
--- a/lib/private/Files/ObjectStore/Swift.php
+++ b/lib/private/Files/ObjectStore/Swift.php
@@ -82,7 +82,7 @@ class Swift implements IObjectStore {
}
$cacheFactory = \OC::$server->getMemCacheFactory();
- $this->memcache = $cacheFactory->create('swift::' . $cacheKey);
+ $this->memcache = $cacheFactory->createDistributed('swift::' . $cacheKey);
$this->params = $params;
}
diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php
index ee7e35550a6..771ac891ab4 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -87,7 +87,7 @@ class Checker {
$this->fileAccessHelper = $fileAccessHelper;
$this->appLocator = $appLocator;
$this->config = $config;
- $this->cache = $cacheFactory->create(self::CACHE_KEY);
+ $this->cache = $cacheFactory->createDistributed(self::CACHE_KEY);
$this->appManager = $appManager;
$this->tempManager = $tempManager;
}
diff --git a/lib/private/OCS/DiscoveryService.php b/lib/private/OCS/DiscoveryService.php
index e547747da25..4425947c55d 100644
--- a/lib/private/OCS/DiscoveryService.php
+++ b/lib/private/OCS/DiscoveryService.php
@@ -46,7 +46,7 @@ class DiscoveryService implements IDiscoveryService {
public function __construct(ICacheFactory $cacheFactory,
IClientService $clientService
) {
- $this->cache = $cacheFactory->create('ocs-discovery');
+ $this->cache = $cacheFactory->createDistributed('ocs-discovery');
$this->client = $clientService->newClient();
}
diff --git a/lib/private/Security/RateLimiting/Backend/MemoryCache.php b/lib/private/Security/RateLimiting/Backend/MemoryCache.php
index 212df664c17..700fa624ed4 100644
--- a/lib/private/Security/RateLimiting/Backend/MemoryCache.php
+++ b/lib/private/Security/RateLimiting/Backend/MemoryCache.php
@@ -45,7 +45,7 @@ class MemoryCache implements IBackend {
*/
public function __construct(ICacheFactory $cacheFactory,
ITimeFactory $timeFactory) {
- $this->cache = $cacheFactory->create(__CLASS__);
+ $this->cache = $cacheFactory->createDistributed(__CLASS__);
$this->timeFactory = $timeFactory;
}
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 6898e93e3bb..8560ce1292f 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -952,7 +952,7 @@ class Server extends ServerContainer implements IServerContainer {
$c->getConfig(),
$c->getThemingDefaults(),
\OC::$SERVERROOT,
- $cacheFactory->create('SCSS')
+ $cacheFactory->createDistributed('SCSS')
);
});
$this->registerService(EventDispatcher::class, function () {
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 997980aa5d7..264c10f5f1b 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -291,7 +291,7 @@ class TemplateLayout extends \OC_Template {
new JSCombiner(
\OC::$server->getAppDataDir('js'),
\OC::$server->getURLGenerator(),
- \OC::$server->getMemCacheFactory()->create('JS'),
+ \OC::$server->getMemCacheFactory()->createDistributed('JS'),
\OC::$server->getSystemConfig(),
\OC::$server->getLogger()
)
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index 6fd22b99a6b..f7d80d41b4f 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -151,7 +151,7 @@ class URLGenerator implements IURLGenerator {
* Returns the path to the image.
*/
public function imagePath($app, $image) {
- $cache = $this->cacheFactory->create('imagePath-'.md5($this->getBaseUrl()).'-');
+ $cache = $this->cacheFactory->createDistributed('imagePath-'.md5($this->getBaseUrl()).'-');
$cacheKey = $app.'-'.$image;
if($key = $cache->get($cacheKey)) {
return $key;
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php
index e611b4d0732..8bbfb235ee2 100644
--- a/lib/private/legacy/helper.php
+++ b/lib/private/legacy/helper.php
@@ -497,7 +497,7 @@ class OC_Helper {
* @return null|string
*/
public static function findBinaryPath($program) {
- $memcache = \OC::$server->getMemCacheFactory()->create('findBinaryPath');
+ $memcache = \OC::$server->getMemCacheFactory()->createDistributed('findBinaryPath');
if ($memcache->hasKey($program)) {
return $memcache->get($program);
}
diff --git a/settings/ajax/uninstallapp.php b/settings/ajax/uninstallapp.php
index b4a2468bd2a..a932e2d79e9 100644
--- a/settings/ajax/uninstallapp.php
+++ b/settings/ajax/uninstallapp.php
@@ -43,8 +43,8 @@ $appId = OC_App::cleanAppId($appId);
$result = OC_App::removeApp($appId);
if($result !== false) {
// FIXME: Clear the cache - move that into some sane helper method
- \OC::$server->getMemCacheFactory()->create('settings')->remove('listApps-0');
- \OC::$server->getMemCacheFactory()->create('settings')->remove('listApps-1');
+ \OC::$server->getMemCacheFactory()->createDistributed('settings')->remove('listApps-0');
+ \OC::$server->getMemCacheFactory()->createDistributed('settings')->remove('listApps-1');
OC_JSON::success(array('data' => array('appid' => $appId)));
} else {
$l = \OC::$server->getL10N('settings');