summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/bootstrap.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index d18564462..846cbdc35 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1989,13 +1989,13 @@ function _drupal_bootstrap_page_cache() {
$cache = drupal_page_get_cache();
// If there is a cached page, display it.
if (is_object($cache)) {
+ header('X-Drupal-Cache: HIT');
date_default_timezone_set(drupal_get_user_timezone());
// If the skipping of the bootstrap hooks is not enforced, call
// hook_boot.
if (variable_get('page_cache_invoke_hooks', TRUE)) {
bootstrap_invoke_all('boot');
}
- header('X-Drupal-Cache: HIT');
drupal_serve_page_from_cache($cache);
// If the skipping of the bootstrap hooks is not enforced, call
// hook_exit.
@@ -2005,6 +2005,9 @@ function _drupal_bootstrap_page_cache() {
// We are done.
exit;
}
+ else {
+ header('X-Drupal-Cache: MISS');
+ }
}
}
@@ -2062,9 +2065,6 @@ function _drupal_bootstrap_variables() {
*/
function _drupal_bootstrap_page_header() {
bootstrap_invoke_all('boot');
- if (!drupal_page_get_cache(TRUE) && drupal_page_is_cacheable()) {
- header('X-Drupal-Cache: MISS');
- }
// Prepare for non-cached page workflow.
require_once DRUPAL_ROOT . '/' . variable_get('lock_inc', 'includes/lock.inc');