summaryrefslogtreecommitdiff
path: root/it_cache.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_cache.class')
-rw-r--r--it_cache.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_cache.class b/it_cache.class
index bcd9bd3..20e3f43 100644
--- a/it_cache.class
+++ b/it_cache.class
@@ -52,7 +52,7 @@ static function get($key, $p = array())
else if ($p['distributed'] && ($memcache = it_cache::_get_memcache($p)))
$result = @$memcache->get($key);
else
- $result = function_exists("eaccelerator_get") ? eaccelerator_get($key) : null;
+ $result = function_exists("apc_fetch") ? apc_fetch($key) : (function_exists("eaccelerator_get") ? eaccelerator_get($key) : null);
return $result;
}
@@ -75,7 +75,7 @@ static function put($key, $value, $p = array())
else
{
function_exists("eaccelerator_gc") && eaccelerator_gc();
- $result = function_exists("eaccelerator_put") ? eaccelerator_put($key, $value, $p['ttl']) : null;
+ $result = function_exists("apc_store") ? apc_store($key, $value, $p['ttl']) : (function_exists("eaccelerator_put") ? eaccelerator_put($key, $value, $p['ttl']) : null);
}
$GLOBALS['it_cache_local'][$key] = $value; # Also store local copy