protected function _initCache($current = false)
    {
        $c = $this->getParam('cache');

        if (empty($c['fields'])) {
            return false;
        }

        if (is_null($this->_cache)) {
            if (isset($c['backend'])) {
                $backend = $c['backend'];
            } elseif (isset($c['cacheob'])) {
                /* Deprecated */
                $backend = new Horde_Imap_Client_Cache_Backend_Cache($c);
            } else {
                return false;
            }

            $this->_cache = new Horde_Imap_Client_Cache(array(
                'backend' => $backend,
                'baseob' => $this,
                'debug' => $this->_debug
            ));
        }

        return $current
            /* If UIDs are labeled as not sticky, don't cache since UIDs will
             * change on every access. */
            ? !($this->_mailboxOb()->getStatus(Horde_Imap_Client::STATUS_UIDNOTSTICKY))
            : true;
    }
protected function _initCache($current = false)
    {
        $c = $this->getParam('cache');

        if (empty($c['fields'])) {
            return false;
        }

        if (is_null($this->_cache)) {
            if (isset($c['backend'])) {
                $backend = $c['backend'];
            } elseif (isset($c['cacheob'])) {
                /* Deprecated */
                $backend = new Horde_Imap_Client_Cache_Backend_Cache($c);
            } else {
                return false;
            }

            $this->_cache = new Horde_Imap_Client_Cache(array(
                'backend' => $backend,
                'baseob' => $this,
                'debug' => $this->_debug
            ));
        }

        return $current
            /* If UIDs are labeled as not sticky, don't cache since UIDs will
             * change on every access. */
            ? !($this->_mailboxOb()->getStatus(Horde_Imap_Client::STATUS_UIDNOTSTICKY))
            : true;
    }
protected function _initCache ( $ current = false ) { $ c = $ this -> getParam ( 'cache' ) ; if ( empty ( $ c [ 'fields' ] ) ) { return false ; } if ( is_null ( $ this -> _cache ) ) { if ( isset ( $ c [ 'backend' ] ) ) { $ backend = $ c [ 'backend' ] ; } elseif ( isset ( $ c [ 'cacheob' ] ) ) { /* Deprecated */ $ backend = new Horde_Imap_Client_Cache_Backend_Cache ( $ c ) ; } else { return false ; } $ this -> _cache = new Horde_Imap_Client_Cache ( array ( 'backend' => $ backend , 'baseob' => $ this , 'debug' => $ this -> _debug ) ) ; } return $ current /* If UIDs are labeled as not sticky, don't cache since UIDs will
             * change on every access. */ ? ! ( $ this -> _mailboxOb ( ) -> getStatus ( Horde_Imap_Client :: STATUS_UIDNOTSTICKY ) ) : true ; }
Initialize the Horde_Imap_Client_Cache object, if necessary.

@param boolean $current  If true, we are going to update the currently
selected mailbox. Add an additional check to
see if caching is available in current
mailbox.

@return boolean  Returns true if caching is enabled.
Initialize the Horde_Imap_Client_Cache object if necessary .