function cacheflush_cron_cronapi in CacheFlush 7
Same name and namespace in other branches
- 7.3 modules/cacheflush_cron/cacheflush_cron.module \cacheflush_cron_cronapi()
- 7.2 cacheflush_cron/cacheflush_cron.module \cacheflush_cron_cronapi()
Implements hook_cronapi().
File
- cacheflush_cron/
cacheflush_cron.module, line 74 - Cacheflush cron job.
Code
function cacheflush_cron_cronapi($op, $job = NULL) {
$cache_presets = variable_get('cacheflush_preset_list', array());
$items = array();
foreach ($cache_presets as $key => $preset) {
if (isset($preset['#cron']) && $preset['#cron']['checkbox'] == '1') {
$items['cacheflush_prest_' . $key] = array(
'description' => t('Cron for cacheflush preset ') . $preset['#name'],
'rule' => $preset['#cron']['rule'],
'callback' => '_cacheflush_clear_preset',
'arguments' => array(
$key,
),
);
}
}
return $items;
}