function boost_cron in Boost 7
Same name and namespace in other branches
- 5 boost.module \boost_cron()
- 6 boost.module \boost_cron()
Implements hook_cron(). Performs periodic actions.
File
- ./
boost.module, line 378 - Caches generated output as a static file to be served directly from the webserver.
Code
function boost_cron() {
// Remove expired files from the cache.
global $_boost;
// This was not invoked in hook_init because of the quick check to
// avoid caching requests from the CLI
$_boost = boost_transform_url();
if (isset($_boost['base_dir']) && variable_get('boost_expire_cron', BOOST_EXPIRE_CRON)) {
$count = _boost_rmdir($_boost['base_dir'], FALSE);
if (variable_get('boost_message_debug', BOOST_MESSAGE_DEBUG)) {
watchdog('boost', 'Expired %count stale files from static page cache.', array(
'%count' => $count,
), WATCHDOG_NOTICE);
}
}
}