original_string: public function read($sql)
  	{
  		$segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1);
  		$segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
  		$filepath = $this->db->cachedir.$segment_one.'+'.$segment_two.'/'.md5($sql);
  
  		if (FALSE === ($cachedata = @file_get_contents($filepath)))
  		{
  			return FALSE;
  		}
  
  		return unserialize($cachedata);
  	}
code: public function read($sql)
  	{
  		$segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1);
  		$segment_two = ($this->CI->uri->segment(2) == FALSE) ? 'index' : $this->CI->uri->segment(2);
  		$filepath = $this->db->cachedir.$segment_one.'+'.$segment_two.'/'.md5($sql);
  
  		if (FALSE === ($cachedata = @file_get_contents($filepath)))
  		{
  			return FALSE;
  		}
  
  		return unserialize($cachedata);
  	}
code_tokens: public function read ( $ sql ) { $ segment_one = ( $ this -> CI -> uri -> segment ( 1 ) == FALSE ) ? 'default' : $ this -> CI -> uri -> segment ( 1 ) ; $ segment_two = ( $ this -> CI -> uri -> segment ( 2 ) == FALSE ) ? 'index' : $ this -> CI -> uri -> segment ( 2 ) ; $ filepath = $ this -> db -> cachedir . $ segment_one . '+' . $ segment_two . '/' . md5 ( $ sql ) ; if ( FALSE === ( $ cachedata = @ file_get_contents ( $ filepath ) ) ) { return FALSE ; } return unserialize ( $ cachedata ) ; }
docstring: Retrieve a cached query
  
  The URI being requested will become the name of the cache sub-folder.
  An MD5 hash of the SQL statement will become the cache file name.
  
  @param	string	$sql
  @return	string
docstring_tokens: Retrieve a cached query