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 19:42:50 +0400
committerBart Visscher <bartv@thisnet.nl>2012-06-25 23:05:10 +0400
commit531c1c509c32d400f0eebfd436ac608a6b6e35a7 (patch)
tree101f7b6e23efd981110ce5a4f4fece72117846c1 /lib/cache.php
parent4e4a1a4274940a9aa7b4c9313d13f8aeb80123ba (diff)
Cache: Add APC and XCache to global cache handler
Diffstat (limited to 'lib/cache.php')
-rw-r--r--lib/cache.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/cache.php b/lib/cache.php
index e6f2beeb306..1f269174fad 100644
--- a/lib/cache.php
+++ b/lib/cache.php
@@ -12,7 +12,17 @@ class OC_Cache {
static public function getGlobalCache() {
if (!self::$global_cache) {
+ $fast_cache = null;
+ if (!$fast_cache && function_exists('xcache_set')) {
+ $fast_cache = new OC_Cache_XCache(true);
+ }
+ if (!$fast_cache && function_exists('apc_store')) {
+ $fast_cache = new OC_Cache_APC(true);
+ }
self::$global_cache = new OC_Cache_FileGlobal();
+ if ($fast_cache) {
+ self::$global_cache = new OC_Cache_Broker($fast_cache, self::$global_cache);
+ }
}
return self::$global_cache;
}