aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cache/xcache.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cache/xcache.php')
-rw-r--r--lib/cache/xcache.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/cache/xcache.php b/lib/cache/xcache.php
index b57338929e0..bd55cee8f6b 100644
--- a/lib/cache/xcache.php
+++ b/lib/cache/xcache.php
@@ -7,11 +7,20 @@
*/
class OC_Cache_XCache {
+ protected $prefix;
+
+ public function __construct($global = false) {
+ $this->prefix = OC_Util::getInstanceId().'/';
+ if (!$global) {
+ $this->prefix .= OC_User::getUser().'/';
+ }
+ }
+
/**
* entries in XCache gets namespaced to prevent collisions between owncloud instances and users
*/
protected function getNameSpace() {
- return OC_Util::getInstanceId().'/'.OC_User::getUser().'/';
+ return $this->prefix;
}
public function get($key) {