/** Fetch pairs from the model * @access public * @param string $sql * @param array $bind * @return array */ public function fetchPairs($sql, $bind = array()) { $id = md5($sql); if (!$this->_cache->test($id) || !$this->cache_result) { $result = parent::fetchPairs($sql, $bind); $this->_cache->save($result); return $result; } else { return $this->_cache->load($id); } }