function SetCache($type, $id, $value) {
		if (!isset($this->cache[$type]) || !$this->cache[$type]) // Dont cache this type of call
			return $value;
		if ($value) {
			if (!isset($this->_cache[$type]))
				$this->_cache[$type] = array();
			$this->_cache[$type][$id] = $value;
			return $this->_cache[$type][$id];
		} elseif (isset($this->_cache[$type][$id])) {
			unset($this->_cache[$type][$id]);
			return null;
		}
	}
function SetCache($type, $id, $value) {
		if (!isset($this->cache[$type]) || !$this->cache[$type]) // Dont cache this type of call
			return $value;
		if ($value) {
			if (!isset($this->_cache[$type]))
				$this->_cache[$type] = array();
			$this->_cache[$type][$id] = $value;
			return $this->_cache[$type][$id];
		} elseif (isset($this->_cache[$type][$id])) {
			unset($this->_cache[$type][$id]);
			return null;
		}
	}
function SetCache ( $ type , $ id , $ value ) { if ( ! isset ( $ this -> cache [ $ type ] ) || ! $ this -> cache [ $ type ] ) // Dont cache this type of call return $ value ; if ( $ value ) { if ( ! isset ( $ this -> _cache [ $ type ] ) ) $ this -> _cache [ $ type ] = array ( ) ; $ this -> _cache [ $ type ] [ $ id ] = $ value ; return $ this -> _cache [ $ type ] [ $ id ] ; } elseif ( isset ( $ this -> _cache [ $ type ] [ $ id ] ) ) { unset ( $ this -> _cache [ $ type ] [ $ id ] ) ; return null ; } }
Set a cache item
@param string $type The operation (e.g. 'get', 'getall')
@param mixed $id The ID of the row to cache
@param mixed|null $value The value to cache (set to null to remove from cache)
@return mixed|null The cache contents if any
Set a cache item