On Wed, 7 Dec 2005 13:31:25 -0500, Geuis Teses geuis.teses@gmail.com wrote:
In this code in func.inc, it looks like RC is caching a message both to the database and to the local temp directory. Why does it cache 2 times?
// let's cache the message body within the database if ($CONFIG['enable_caching'] && $cached && ($CONFIG['db_max_length'] -300) > $headers->size) { $DB->query("UPDATE ".get_table_name('messages')." SET body=? WHERE user_id=? AND cache_key=? AND uid=?", $msg_source, $_SESSION['user_id'], $cache_key, $uid);
return $msg_source; }
// create dir for caching if (!is_dir($cache_dir)) $dir = mkdir($cache_dir); else $dir = true;
Strange, I had a post on this weeks back and it was commented that since I (and likely most) are running IMAP/MySQL on the same server having enable_caching wouldnt' provide any benefit. It seems that there should be another variable like: if ($CONFIG['enable_fscaching'] to handle filesystem caching - then you could select one within main.inc. I would recommend defaulting to the fs version. Comments?
http://fak3r.com - you don't have to kick it