summaryrefslogtreecommitdiffstats
path: root/lib/private/memcache/factory.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/memcache/factory.php')
-rw-r--r--lib/private/memcache/factory.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/private/memcache/factory.php b/lib/private/memcache/factory.php
index fde7d947567..334cf9a1f0e 100644
--- a/lib/private/memcache/factory.php
+++ b/lib/private/memcache/factory.php
@@ -8,7 +8,21 @@
namespace OC\Memcache;
-class Factory {
+use \OCP\ICacheFactory;
+
+class Factory implements ICacheFactory {
+ /**
+ * @var string $globalPrefix
+ */
+ private $globalPrefix;
+
+ /**
+ * @param string $globalPrefix
+ */
+ public function __construct($globalPrefix) {
+ $this->globalPrefix = $globalPrefix;
+ }
+
/**
* get a cache instance, will return null if no backend is available
*
@@ -16,6 +30,7 @@ class Factory {
* @return \OC\Memcache\Cache
*/
function create($prefix = '') {
+ $prefix = $this->globalPrefix . '/' . $prefix;
if (XCache::isAvailable()) {
return new XCache($prefix);
} elseif (APCu::isAvailable()) {