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;
		}
	}