phpgroupware-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-tracker] [bug #4224] Cache causes header/body misalignment


From: nobody
Subject: [Phpgroupware-tracker] [bug #4224] Cache causes header/body misalignment.
Date: Thu, 17 Jul 2003 00:23:13 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030714 Mozilla Firebird/0.6

=================== BUG #4224: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4224&group_id=509

Changes by: Angelo Tony Puglisi <address@hidden>
Date: Thu 07/17/2003 at 00:23 (America/New_York)

------------------ Additional Follow-up Comments ----------------------------
It is possible that for general use the cache could be 
cleared on login. That's a good idea. However I also plan 
to cache entire folders, headers, body parts, and all, 
which you may not want to wipe clean on every login, 
but then again maybe you do. I added the "geekbar" to the 
last release, and below the "geekbar" are going to be 
some links for testing stuff, such as: cache this folder, 
clear cache this folder, clear entire cache, cache first 
200 messages, delete all messages in this folder, 
stuff like that. I guess I am rambling.

Since the upcoming phpgw .16 API will have hooks 
for code to be called on login and on logout, this 
will be easier on .16 future version. For the current 
.14 version I may need to check some kind of sessionID 
and note when a new session is started, and clear the 
cache.




=================== BUG #4224: FULL BUG SNAPSHOT ===================


Submitted by: dhouston                Project: phpGroupWare                 
Submitted on: Mon 07/07/2003 at 12:02
Category:  email                      Bug Group:  0.9.16 pre RC             
Severity:  5 - Major                  Priority:  None                       
Resolution:  None                     Assigned to:  angles                  
Status:  Open                         Component Version:  None              
Platform Version:  None               Reproducibility:  Every Time          

Summary:  Cache causes header/body misalignment.

Original Submission:  A user was finding old emails listed in his inbox, but 
when he clicked on them to view them, different email bodies were being 
displayed. I figured out at last that because he uses groupware from home but 
Outlook from work to check email, his Outlook sometimes deletes messages 
without (of course) updating the gw cache.  So old subjects/headers are listed 
in the cache and are displayed when the inbox is displayed in gw.  When you 
click on a message, if a message exists corresponding to the position of the 
message clicked on (that is, if there are three cached message headers and 
there are two messages actually in the inbox and you happen to click on the 
first or the second listed), its body will be displayed, resulting in 
mismatched information.  The best solution I can think of for the time being is 
to delete the mail cache upon logging into groupware.  This causes a new cache 
to be built based on what's on the server and prevents this displaying of old 
mail and the misalignment of headers/bodies.  I added the following function to 
class.mail_msg_wrappers.inc.php:

                @function clear_cache
                @abstract ?
                */
                function clear_cache()
                {
                        $account_id = 
get_account_id($accountid,$GLOBALS['phpgw']->session->account_id);
                        $GLOBALS['phpgw']->db->query("DELETE FROM 
phpgw_anglemail "
                                . " WHERE account_id=" . 
$account_id,__LINE__,__FILE__);
                }

and the following code to login.php just after the session has been created:

                        $m=CreateObject('email.mail_msg');
                        if(!is_object($m)){ print "Error."; }
                        $m->clear_cache();

This seems to have solved the problem.

Follow-up Comments
*******************

-------------------------------------------------------
Date: Thu 07/17/2003 at 00:23       By: angles
It is possible that for general use the cache could be 
cleared on login. That's a good idea. However I also plan 
to cache entire folders, headers, body parts, and all, 
which you may not want to wipe clean on every login, 
but then again maybe you do. I added the "geekbar" to the 
last release, and below the "geekbar" are going to be 
some links for testing stuff, such as: cache this folder, 
clear cache this folder, clear entire cache, cache first 
200 messages, delete all messages in this folder, 
stuff like that. I guess I am rambling.

Since the upcoming phpgw .16 API will have hooks 
for code to be called on login and on logout, this 
will be easier on .16 future version. For the current 
.14 version I may need to check some kind of sessionID 
and note when a new session is started, and clear the 
cache.



CC List
*******

CC Address                          | Comment
------------------------------------+-----------------------------
address@hidden             | fyi



No files currently attached


For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4224&group_id=509

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]