function dynamic_cache_should_run in Dynamic Cache 6
Same name and namespace in other branches
- 7 dynamic_cache.module \dynamic_cache_should_run()
Helper function that tests whether or not bootstrap should be hijacked.
1 call to dynamic_cache_should_run()
- dynamic_cache_boot in ./
dynamic_cache.module - Implements hook_boot().
File
- ./
dynamic_cache.module, line 62 - Dynamic Cache module.
Code
function dynamic_cache_should_run() {
// Bootstrap called outside of normal index.php (e.g. cron.php).
if (strpos($_SERVER['PHP_SELF'], 'index.php') === FALSE) {
return FALSE;
}
// We are in a drush context.
if (defined('DRUSH_BOOTSTRAP_DRUPAL_FULL')) {
return FALSE;
}
// Hijack the bootstrap.
if (array_key_exists('cache', $GLOBALS['conf']) && $GLOBALS['conf']['cache'] == CACHE_DISABLED) {
return TRUE;
}
return FALSE;
}