If you using Pressflow with Messages Alter forget of creating cache page for anonymous users.

CommentFileSizeAuthor
#1 messages_alter_pressflow-1173020-1.patch831 bytesgdud

Comments

gdud’s picture

StatusFileSize
new831 bytes

Pressflow don't use sessions for anonymous users.

The session starts in drupal_session_start() where drupal check if $_SESSION is empty. However Messages Alter creates empty array 'messages' in $_SESSION variable even if there are no messages to display so... session always starting for anonymous users.

drupal_page_is_cacheable() function (added by Pressflow) check if session has already stared by calling drupal_session_started(). If yes, page don't retrieve from cache, and new cache will not be created.

Solution is simple. See in attachement patch.

matsearle’s picture

Can someone apply this patch to the module, gdud has made valid comments. It won't affect normal drupal installs. I've just had to patch this module even though the patch was released before the latest release.

Thanks

BartonDrupal’s picture

Yeah, I'm on a deadline so I'll get to it soon.

achton’s picture

FWIW, this works for me too.