aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/cache.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-06 11:09:10 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-06 11:09:10 +0000
commitb752befd19233618c7681ce29308cd485502dd5e (patch)
tree344fd1a812d0e18dcbf16168bf70b1645db456ee /engine/lib/cache.php
parent4acff6b9c106ef73362dbb289fb2fade01c5f24d (diff)
downloadelgg-b752befd19233618c7681ce29308cd485502dd5e.tar.gz
elgg-b752befd19233618c7681ce29308cd485502dd5e.tar.bz2
Added test to see if memcache is available.
git-svn-id: https://code.elgg.org/elgg/trunk@2411 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/cache.php')
-rw-r--r--engine/lib/cache.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/engine/lib/cache.php b/engine/lib/cache.php
index 0363f501b..23f3c302b 100644
--- a/engine/lib/cache.php
+++ b/engine/lib/cache.php
@@ -450,13 +450,8 @@
// TODO : hook out to the world ? (can't if using as object cache)
// Try and see if memcache is present & enabled
- try {
- if ((isset($CONFIG->memcache) && ($CONFIG->memcache=true)))
- return new ElggMemcache($namespace);
- } catch (Exception $e) {
- if ((isset($CONFIG->debug)) && ($CONFIG->debug == true))
- error_log("$e");
- }
+ if (is_memcache_available())
+ return new ElggMemcache($namespace);
return new ElggStaticVariableCache($namespace);
}