page_get_cache

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 page_get_cache($status_only = FALSE)
drupal7 page_get_cache($retrieve)

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).

Übergabeparameter

$status_only When set to TRUE, retrieve the status of the page cache only (whether it was started in this request or not).

Code

includes/bootstrap.inc, line 651

<?php
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 && $_SERVER['SERVER_SOFTWARE'] !== 'PHP CLI') {
    $cache = cache_get($base_root . request_uri(), 'cache_page');

    if (empty($cache)) {
      ob_start();
      $status = TRUE;
    }
  }

  return $cache;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen