7.x bootstrap.inc drupal_page_is_cacheable($allow_caching = NULL)

Determines the cacheability of the current page.

Parameters

$allow_caching: Set to FALSE if you want to prevent this page from being cached.

Return value

TRUE if the current page can be cached, FALSE otherwise.

2 calls to drupal_page_is_cacheable()
drupal_session_initialize in includes/session.inc
Initializes the session handler, starting a session if needed.
drupal_set_message in includes/bootstrap.inc
Sets a message to display to the user.

File

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

Code

function drupal_page_is_cacheable($allow_caching = NULL) {
  $allow_caching_static =& drupal_static(__FUNCTION__, TRUE);
  if (isset($allow_caching)) {
    $allow_caching_static = $allow_caching;
  }
  return $allow_caching_static && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD') && !drupal_is_cli();
}