function cacheflush_cron_cronapi in CacheFlush 7.3
Same name and namespace in other branches
- 7 cacheflush_cron/cacheflush_cron.module \cacheflush_cron_cronapi()
- 7.2 cacheflush_cron/cacheflush_cron.module \cacheflush_cron_cronapi()
Implements hook_cronapi().
File
- modules/
cacheflush_cron/ cacheflush_cron.module, line 69 - Cacheflush cron job.
Code
function cacheflush_cron_cronapi($op, $job = NULL) {
$entities = cacheflush_load_multiple(FALSE, array(
'status' => CACHEFLUSH_UI_ENABLED,
'cron' => CACHEFLUSH_CRON,
));
$items = array();
foreach ($entities as $key => $entity) {
$items['cacheflush_entity_' . $key] = array(
'description' => t('Cron for cacheflush preset:') . $entity->title,
'rule' => $entity->cron_rule,
'callback' => '_cacheflush_clear_preset',
'arguments' => array(
$entity->id,
),
'file' => 'cacheflush.api.inc',
'file path' => drupal_get_path('module', 'cacheflush'),
);
}
return $items;
}