diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-01-06 12:55:56 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-01-06 12:55:56 +0100 |
commit | 1df1b55b66f0bcc696a1ee9aeb8362dee9889100 (patch) | |
tree | 27b682e3af4051ff6782d9a62cafc6c6144bd02e | |
parent | 0e843b9d7d36976322df33fee6a3cc36e07fea85 (diff) | |
download | nextcloud-server-1df1b55b66f0bcc696a1ee9aeb8362dee9889100.tar.gz nextcloud-server-1df1b55b66f0bcc696a1ee9aeb8362dee9889100.zip |
expose memory cache in public api
-rw-r--r-- | lib/private/server.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index bee70dec2df..84ee8cadf04 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -136,6 +136,10 @@ class Server extends SimpleContainer implements IServerContainer { $this->registerService('UserCache', function($c) { return new UserCache(); }); + $this->registerService('MemCache', function ($c) { + $factory = new \OC\Memcache\Factory(); + return $factory->create(); + }); $this->registerService('ActivityManager', function($c) { return new ActivityManager(); }); @@ -296,6 +300,15 @@ class Server extends SimpleContainer implements IServerContainer { } /** + * Returns an ICache instance + * + * @return \OCP\ICache + */ + function getMemCache() { + return $this->query('MemCache'); + } + + /** * Returns the current session * * @return \OCP\ISession |