You are here

function page_get_cache in Drupal 5

Same name and namespace in other branches
  1. 4 includes/bootstrap.inc \page_get_cache()
  2. 6 includes/bootstrap.inc \page_get_cache()

Retrieve the current page from the cache.

Note: we do not serve cached pages when status messages are waiting (from a redirected form submission which was completed).

1 call to page_get_cache()
_drupal_cache_init in includes/bootstrap.inc
Initialize the caching strategy, which loads at different stages within Drupal's bootstrap process.

File

includes/bootstrap.inc, line 498
Functions that need to be loaded on every Drupal request.

Code

function page_get_cache() {
  global $user, $base_root;
  $cache = NULL;
  if (!$user->uid && $_SERVER['REQUEST_METHOD'] == 'GET' && count(drupal_set_message()) == 0) {
    $cache = cache_get($base_root . request_uri(), 'cache_page');
    if (empty($cache)) {
      ob_start();
    }
  }
  return $cache;
}