public function fetch($structure = 'rows', $noCache = false)
	{
		// Build and hash query
		$query = $this->buildQuery();
		$key   = hash('md5', $structure . $query . serialize($this->syntax->getBindings()));

		// Check cache for results first
		if ($noCache || !isset(self::$cache[$key]))
		{
			self::$cache[$key] = $this->query($query, $structure);
		}

		// Clear elements
		$this->reset();

		return self::$cache[$key];
	}
public function fetch($structure = 'rows', $noCache = false)
	{
		// Build and hash query
		$query = $this->buildQuery();
		$key   = hash('md5', $structure . $query . serialize($this->syntax->getBindings()));

		// Check cache for results first
		if ($noCache || !isset(self::$cache[$key]))
		{
			self::$cache[$key] = $this->query($query, $structure);
		}

		// Clear elements
		$this->reset();

		return self::$cache[$key];
	}
public function fetch ( $ structure = 'rows' , $ noCache = false ) { // Build and hash query $ query = $ this -> buildQuery ( ) ; $ key = hash ( 'md5' , $ structure . $ query . serialize ( $ this -> syntax -> getBindings ( ) ) ) ; // Check cache for results first if ( $ noCache || ! isset ( self :: $ cache [ $ key ] ) ) { self :: $ cache [ $ key ] = $ this -> query ( $ query , $ structure ) ; } // Clear elements $ this -> reset ( ) ; return self :: $ cache [ $ key ] ; }
Retrieves all applicable data

@FIXME: this could result in slightly odd behavior if you call the same query
twice, but for some reason want differing structures of the returned data.

@param   string  $structure  The structure of the item(s) returned (if applicable)
@param   bool    $noCache    Whether or not to check cache for results
@return  $this
@since   2.0.0
Retrieves all applicable data