thomascube
2007-05-17 ffb0b014e77d5831111cee4bc317ff365ef168b7
Always respect 'enable_caching' config param

1 files modified
4 ■■■■ changed files
program/include/rcube_imap.inc 4 ●●●● patch | view | raw | blame | history
program/include/rcube_imap.inc
@@ -1999,7 +1999,7 @@
    static $sa_message_index = array();
    
    // empty key -> empty array
    if (empty($key))
    if (!$this->caching_enabled || empty($key))
      return array();
    
    if (!empty($sa_message_index[$key]) && !$force)
@@ -2024,7 +2024,7 @@
  function add_message_cache($key, $index, $headers, $struct=null)
    {
    if (empty($key) || !is_object($headers) || empty($headers->uid))
    if (!$this->caching_enabled || empty($key) || !is_object($headers) || empty($headers->uid))
      return;
      
    // check for an existing record (probly headers are cached but structure not)