_drupal_cache_init
includes/bootstrap.inc, строка 970
- Версии
- 5
_drupal_cache_init($phase)
Initialize the caching strategy, which loads at different stages within Drupal's bootstrap process.
Код
<?php
function _drupal_cache_init($phase) {
require_once variable_get('cache_inc', './includes/cache.inc');
if ($phase == DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE && variable_get('page_cache_fastpath', 0)) {
if (page_cache_fastpath()) {
exit();
}
}
elseif ($phase == DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE) {
if ($cache = page_get_cache()) {
if (variable_get('cache', CACHE_DISABLED) == CACHE_AGGRESSIVE) {
drupal_page_cache_header($cache);
exit();
}
elseif (variable_get('cache', CACHE_DISABLED) == CACHE_NORMAL) {
require_once './includes/module.inc';
bootstrap_invoke_all('init');
drupal_page_cache_header($cache);
bootstrap_invoke_all('exit');
exit();
}
}
require_once './includes/module.inc';
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии