protected function _getSelectAllCached($cacheId, $sql, $binds = array(), $tags = array(), $natSort = false)
    {
        $cacheId = strtr(get_class($this) . '_a_' . $cacheId, '\\/', '__');

        $result = $this->cache->load($cacheId);

        if ($result) {
            return $result;
        }

        try {
            $result = $this->db->fetchAll($sql, (array) $binds);

            if ($natSort) {
                natsort($result);
            }

            $this->cache->save($result, $cacheId, (array) $tags);
        } catch (\Zend_Db_Statement_Mysqli_Exception $e) {
            $result = array();
        }

        return $result;
    }
protected function _getSelectAllCached($cacheId, $sql, $binds = array(), $tags = array(), $natSort = false)
    {
        $cacheId = strtr(get_class($this) . '_a_' . $cacheId, '\\/', '__');

        $result = $this->cache->load($cacheId);

        if ($result) {
            return $result;
        }

        try {
            $result = $this->db->fetchAll($sql, (array) $binds);

            if ($natSort) {
                natsort($result);
            }

            $this->cache->save($result, $cacheId, (array) $tags);
        } catch (\Zend_Db_Statement_Mysqli_Exception $e) {
            $result = array();
        }

        return $result;
    }
protected function _getSelectAllCached ( $ cacheId , $ sql , $ binds = array ( ) , $ tags = array ( ) , $ natSort = false ) { $ cacheId = strtr ( get_class ( $ this ) . '_a_' . $ cacheId , '\\/' , '__' ) ; $ result = $ this -> cache -> load ( $ cacheId ) ; if ( $ result ) { return $ result ; } try { $ result = $ this -> db -> fetchAll ( $ sql , ( array ) $ binds ) ; if ( $ natSort ) { natsort ( $ result ) ; } $ this -> cache -> save ( $ result , $ cacheId , ( array ) $ tags ) ; } catch ( \ Zend_Db_Statement_Mysqli_Exception $ e ) { $ result = array ( ) ; } return $ result ; }
Utility function for loading a complete query from cache

@param string $cacheId The class is prepended to this id
@param mixed $sql string or \Zend_Db_Select
@param array $binds sql paramters
@param mixed $tags atring or array of strings
@param boolean $natSort Perform a natsort over the output
@return array
Utility function for loading a complete query from cache