aboutsummaryrefslogtreecommitdiffstats
path: root/lib/memcache/cache.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/memcache/cache.php')
-rw-r--r--lib/memcache/cache.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/memcache/cache.php b/lib/memcache/cache.php
index d77ea27933f..331c689f065 100644
--- a/lib/memcache/cache.php
+++ b/lib/memcache/cache.php
@@ -20,6 +20,8 @@ abstract class Cache {
return new XCache($global);
} elseif (APC::isAvailable()) {
return new APC($global);
+ } elseif (Memcached::isAvailable()) {
+ return new Memcached($global);
} else {
return null;
}
@@ -65,5 +67,7 @@ abstract class Cache {
/**
* @return bool
*/
- //static public function isAvailable();
+ static public function isAvailable() {
+ return XCache::isAvailable() || APC::isAvailable() || Memcached::isAvailable();
+ }
}