[RCD] messages caching issues

Thomas Bruederli roundcube at gmail.com
Thu Dec 3 08:56:49 CET 2009


2009/11/24 A.L.E.C <alec at alec.pl>:
> Currently we have possibility to cache messages in browser. However this
> feature is problematic. See http://trac.roundcube.net/ticket/1486281.
> There're also other issues related to javascript commands included into
> (cached) page. Because of that we're using such complicated procedure
> for ETag generation:
>
> $etag = md5($MESSAGE->uid.$mbox_name.session_id()
>     .intval($MESSAGE->headers->mdn_sent)
>     .intval($MESSAGE->is_safe)
>     .(!empty($MESSAGE->attachments) ? intval($CONFIG['inline_images'])
> : '')
>     .intval($PRINT_MODE)
>     .$_SESSION['sort_col'].$_SESSION['sort_order']
>     .$IMAP->messagecount($mbox_name, 'ALL', true)
>     );
>
> It relies on messagescount, sorting, session_id, etc. It means, I think,
> cache is used rarely. Maybe we shouldn't allow caching messages at all?
>

The browser caching was initially added after Roundcube got the
preview pane. For people who navigate the mesage list with the
keyboard it happens that the same message (preview) is loaded several
times with same settings for sorting, messagecount etc. and this is
where the browser caching should kick in.

Maybe we can solve the security issue by adding some more headers but
finally I don't have a strong opinion on keeping this browser caching
feature alive. If more people agree to remove it, feel free to do so.

Regards,
Thomas
_______________________________________________
List info: http://lists.roundcube.net/dev/



More information about the Dev mailing list