summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-01-06 12:55:56 +0100
committerRobin Appelman <icewind@owncloud.com>2014-01-06 12:55:56 +0100
commit1df1b55b66f0bcc696a1ee9aeb8362dee9889100 (patch)
tree27b682e3af4051ff6782d9a62cafc6c6144bd02e
parent0e843b9d7d36976322df33fee6a3cc36e07fea85 (diff)
downloadnextcloud-server-1df1b55b66f0bcc696a1ee9aeb8362dee9889100.tar.gz
nextcloud-server-1df1b55b66f0bcc696a1ee9aeb8362dee9889100.zip
expose memory cache in public api
-rw-r--r--lib/private/server.php13
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