Offline/Cache feature?

wchen - July 28, 2009 - 14:11
Project:Webmail Plus
Version:6.x-1.16
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I just set up Webmail Plus. Everything is great. The only problem I have is that there is no offline/caching feature. I tested with my godaddy.com email account which has 800+ emails. After looking at the code, I realize that in function _webmail_plus_update_messages, when it calls mail_api_overview function, it always tries to download overviews via imap for all the emails. The process takes forever. Is there any easy way to add offline/caching feature so that the overviews of emails are downloaded once and then cached in webmail_plus_user_headers table so that next time when _webmail_plus_update_messages runs, it will only download the overviews for the new emails?

#1

Janam - July 30, 2009 - 16:50

I would love to see this feature being implemented. I've noticed how my website starts slowing down when I have webmail plus enabled and I believe it has to do with what wchen described.

#2

wchen - July 30, 2009 - 19:05

that's because of the function webmail_plus_init(). It is called when loading every single node and it tries to check emails, which is slow. So you are looking at about 2-3 secs delay for every single page. Don't know why it's implemented this way. One quick solution is to add a line
if(arg(0)!='webmail_plus') return;
in the beggining of the funciton webmail_plus_init(), which means that don't check emails unless you are in the webmail module.

 
 

Drupal is a registered trademark of Dries Buytaert.