diff options
| -rw-r--r-- | it_cache.class | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/it_cache.class b/it_cache.class index c3677e3..d6d3029 100644 --- a/it_cache.class +++ b/it_cache.class @@ -47,7 +47,9 @@ function get($key, $p = array())  {  	$p = it_cache::_defaults($p); -	if ($p['distributed'] && ($memcache = it_cache::_get_memcache($p))) +	if ($result = $GLOBALS['it_cache_local'][$key]) +		;	# Use local copy +	else if ($p['distributed'] && ($memcache = it_cache::_get_memcache($p)))  		$result = @$memcache->get($key);  	else  		$result = function_exists("eaccelerator_get") ? eaccelerator_get($key) : null; @@ -76,6 +78,8 @@ function put($key, $value, $p = array())  		$result = function_exists("eaccelerator_put") ? eaccelerator_put($key, $value, $p['ttl']) : null;  	} +	$GLOBALS['it_cache_local'][$key] = $value;	# Also store local copy +  	return $result;  } |