Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-25 10:50:13 +0400
committerBart Visscher <bartv@thisnet.nl>2012-06-25 23:05:10 +0400
commitcae089df91bf2ba9413145dc800d9fa77aab08cb (patch)
tree1b179249370cc8f0c6c54120271e60c7c2f71f7e /lib/cache.php
parentfb53708d10924ee63749439b0c51029093a04b78 (diff)
Cache: Create global cache in OC_Cache
Diffstat (limited to 'lib/cache.php')
-rw-r--r--lib/cache.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/cache.php b/lib/cache.php
index 55d5b064c41..66d1049fb52 100644
--- a/lib/cache.php
+++ b/lib/cache.php
@@ -8,7 +8,21 @@
class OC_Cache {
static protected $cache;
+ static protected $global_cache;
+ static public function getGlobalCache() {
+ if (!self::$global_cache) {
+ self::$global_cache = new OC_Cache_FileGlobal();
+ }
+ return self::$global_cache;
+ }
+
+ static public function getUserCache() {
+ if (!self::$cache) {
+ self::init();
+ }
+ return self::$cache;
+ }
static protected function init() {
$fast_cache = null;
if (!$fast_cache && function_exists('xcache_set')) {