summaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-04-14 15:41:04 +0200
committerRobin Appelman <icewind@owncloud.com>2016-05-03 16:02:17 +0200
commite2f6aa3a57c641c4fe4bebea9497f3801d7d74bc (patch)
treed127f0dc2be132a7c89a3ce398d7af1a91a5e2e2 /lib/private/Server.php
parent4b2544925f7f51d7e5cb1329166451f4fbd9e6bf (diff)
downloadnextcloud-server-e2f6aa3a57c641c4fe4bebea9497f3801d7d74bc.tar.gz
nextcloud-server-e2f6aa3a57c641c4fe4bebea9497f3801d7d74bc.zip
factor out redis configuration into it's own factory
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index bbe6b88876f..f8e7ecfbe14 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -312,6 +312,10 @@ class Server extends ServerContainer implements IServerContainer {
'\\OC\\Memcache\\ArrayCache'
);
});
+ $this->registerService('RedisFactory', function (Server $c) {
+ $systemConfig = $c->getSystemConfig();
+ return new RedisFactory($systemConfig);
+ });
$this->registerService('ActivityManager', function (Server $c) {
return new \OC\Activity\Manager(
$c->getRequest(),
@@ -906,6 +910,16 @@ class Server extends ServerContainer implements IServerContainer {
}
/**
+ * Returns an \OC\RedisFactory instance
+ *
+ * @return \OC\RedisFactory
+ */
+ public function getGetRedisFactory() {
+ return $this->query('RedisFactory');
+ }
+
+
+ /**
* Returns the current session
*
* @return \OCP\IDBConnection