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?