summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authoricewind1991 <robin@icewind.nl>2014-02-04 05:38:53 -0800
committericewind1991 <robin@icewind.nl>2014-02-04 05:38:53 -0800
commita27529709b3c666b89fa7e435c400f9937ee2efa (patch)
tree4749f7c85f2e305c1b39f7e224cc4bc786f28f25 /lib/public
parente266e50699c43b26b67701f0e33a081ee6978425 (diff)
parent1ab7ca0a19d5f3984e87f99945d81aecffbbae19 (diff)
downloadnextcloud-server-a27529709b3c666b89fa7e435c400f9937ee2efa.tar.gz
nextcloud-server-a27529709b3c666b89fa7e435c400f9937ee2efa.zip
Merge pull request #6647 from owncloud/memcache-public
Add Memcache to the public api
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/icachefactory.php28
-rw-r--r--lib/public/iservercontainer.php7
2 files changed, 35 insertions, 0 deletions
diff --git a/lib/public/icachefactory.php b/lib/public/icachefactory.php
new file mode 100644
index 00000000000..874f1ec0a59
--- /dev/null
+++ b/lib/public/icachefactory.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OCP;
+
+interface ICacheFactory{
+ /**
+ * Get a memory cache instance
+ *
+ * All entries added trough the cache instance will be namespaced by $prefix to prevent collisions between apps
+ *
+ * @param string $prefix
+ * @return \OCP\ICache
+ */
+ public function create($prefix = '');
+
+ /**
+ * Check if any memory cache backend is available
+ *
+ * @return bool
+ */
+ public function isAvailable();
+}
diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php
index b958d2d03f4..5473f3ee334 100644
--- a/lib/public/iservercontainer.php
+++ b/lib/public/iservercontainer.php
@@ -142,6 +142,13 @@ interface IServerContainer {
function getCache();
/**
+ * Returns an \OCP\CacheFactory instance
+ *
+ * @return \OCP\ICacheFactory
+ */
+ function getMemCacheFactory();
+
+ /**
* Returns the current session
*
* @return \OCP\ISession