Changeset 2465 in subversion


Ignore:
Timestamp:
May 10, 2009 4:59:39 AM (4 years ago)
Author:
alec
Message:
  • speed up remove_message_cache() by using message uid instead of idx
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_imap.php

    r2462 r2465  
    797797          // delete from cache 
    798798          if ($cache_index[$headers->id] && $cache_index[$headers->id] == $headers->uid) 
    799             $this->remove_message_cache($cache_key, $headers->id); 
     799            $this->remove_message_cache($cache_key, $headers->uid); 
    800800 
    801801          $deleted_count++; 
     
    928928      if (isset($cache_index[$id])) 
    929929        { 
    930         $this->remove_message_cache($cache_key, $id); 
     930        $this->remove_message_cache($cache_key, $cache_index[$id]); 
    931931        unset($cache_index[$id]); 
    932932        } 
     
    942942      { 
    943943      foreach ($cache_index as $id => $uid) 
    944         $this->remove_message_cache($cache_key, $id); 
     944        $this->remove_message_cache($cache_key, $uid); 
    945945      } 
    946946    } 
     
    14371437      { 
    14381438      $mode = $o_part->encoding == 'base64' ? 3 : ($o_part->encoding == 'quoted-printable' ? 1 : 2); 
    1439       $body = iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id, $part, $mode); 
     1439      $body = iil_C_HandlePartBody($this->conn, $this->mailbox, '', $part, $mode); 
    14401440       
    14411441      // we have to decode the part manually before printing 
     
    15681568      foreach ($uids as $uid) 
    15691569        if ($cached_headers = $this->get_cached_message($cache_key, $uid)) 
    1570           $this->remove_message_cache($cache_key, $this->_uid2id($uid)); 
     1570          $this->remove_message_cache($cache_key, $uid); 
    15711571 
    15721572      // close and re-open connection 
     
    24312431   * @access private 
    24322432   */ 
    2433   function remove_message_cache($key, $index) 
     2433  function remove_message_cache($key, $uid) 
    24342434    { 
    24352435    if (!$this->caching_enabled) 
     
    24402440       WHERE  user_id=? 
    24412441       AND    cache_key=? 
    2442        AND    idx=?", 
     2442       AND    uid=?", 
    24432443      $_SESSION['user_id'], 
    24442444      $key, 
    2445       $index); 
     2445      $uid); 
    24462446    } 
    24472447 
Note: See TracChangeset for help on using the changeset viewer.