1 bootstrap.inc backdrop_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.:

File

core/includes/bootstrap.inc, line 1465
Functions that need to be loaded on every Backdrop request.

Code

function backdrop_page_is_cacheable($allow_caching = NULL) {
  $allow_caching_static = &backdrop_static(__FUNCTION__, TRUE);
  if (isset($allow_caching)) {
    $allow_caching_static = $allow_caching;
  }

  return $allow_caching_static && ($_SERVER['REQUEST_METHOD'] == 'GET' || $_SERVER['REQUEST_METHOD'] == 'HEAD') && !backdrop_is_cli();
}