Index: includes/bootstrap.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v retrieving revision 1.206 diff -u -p -r1.206 bootstrap.inc --- includes/bootstrap.inc 10 Jan 2008 22:47:17 -0000 1.206 +++ includes/bootstrap.inc 11 Feb 2008 14:38:50 -0000 @@ -494,10 +494,18 @@ function variable_del($name) { * * Note: we do not serve cached pages when status messages are waiting (from * a redirected form submission which was completed). + * + * @param $status_only + * When set to TRUE, retrieve the status of the page cache only + * (whether it was started in this request or not). */ -function page_get_cache() { +function page_get_cache($status_only = FALSE) { + static $status = FALSE; global $user, $base_root; + if ($status_only) { + return $status; + } $cache = NULL; if (!$user->uid && $_SERVER['REQUEST_METHOD'] == 'GET' && count(drupal_set_message()) == 0) { @@ -505,6 +513,7 @@ function page_get_cache() { if (empty($cache)) { ob_start(); + $status = TRUE; } } Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.756 diff -u -p -r1.756 common.inc --- includes/common.inc 30 Jan 2008 23:07:41 -0000 1.756 +++ includes/common.inc 11 Feb 2008 14:38:54 -0000 @@ -2476,7 +2476,7 @@ function _drupal_bootstrap_full() { function page_set_cache() { global $user, $base_root; - if (!$user->uid && $_SERVER['REQUEST_METHOD'] == 'GET' && count(drupal_get_messages(NULL, FALSE)) == 0) { + if (!$user->uid && $_SERVER['REQUEST_METHOD'] == 'GET' && page_get_cache(TRUE)) { // This will fail in some cases, see page_get_cache() for the explanation. if ($data = ob_get_contents()) { $cache = TRUE;