=== modified file 'includes/bootstrap.inc'
--- includes/bootstrap.inc	2008-01-10 22:47:16 +0000
+++ includes/bootstrap.inc	2008-02-09 15:05:15 +0000
@@ -494,8 +494,12 @@ 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 only the status of the page cache.
  */
-function page_get_cache() {
+function page_get_cache($status_only = FALSE) {
+  static $status = FALSE;
   global $user, $base_root;
 
   $cache = NULL;
@@ -505,10 +509,11 @@ function page_get_cache() {
 
     if (empty($cache)) {
       ob_start();
+      $status = TRUE;
     }
   }
 
-  return $cache;
+  return $status_only ? $status : $cache;
 }
 
 /**

=== modified file 'includes/common.inc'
--- includes/common.inc	2008-01-30 23:07:41 +0000
+++ includes/common.inc	2008-02-09 15:03:57 +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;

