diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-05-12 13:15:12 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-05-12 13:15:12 +0200 |
commit | 9b3eefbf95a70e5b7bc3c9d5b2439bd381d9a979 (patch) | |
tree | 85e0a351d4faf92f3b3722f02a3282638eebfccd /lib/private/Server.php | |
parent | 8b6bb0a4269fee94c0e0842e6a001d70d4af25be (diff) | |
parent | e2f6aa3a57c641c4fe4bebea9497f3801d7d74bc (diff) | |
download | nextcloud-server-9b3eefbf95a70e5b7bc3c9d5b2439bd381d9a979.tar.gz nextcloud-server-9b3eefbf95a70e5b7bc3c9d5b2439bd381d9a979.zip |
Merge pull request #24563 from owncloud/redis-factory
factor out redis configuration into it's own factory
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index cbab1f09ebd..a6f1425d545 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -336,6 +336,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(), @@ -930,6 +934,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 |