function download_count_cache_processor in Download Count 7.3
Adds download count data to the daily cache table.
Parameters
$record: An object containing the download to cache.
1 string reference to 'download_count_cache_processor'
- download_count_cron_queue_info in ./
download_count.module - Implements hook_cron_queue_info().
File
- ./
download_count.module, line 245 - Tracks file downloads for files stored in the drupal files table using the private files setting or custom private filefield.
Code
function download_count_cache_processor($record) {
db_merge('download_count_cache')
->key(array(
'type' => $record->type,
'id' => $record->id,
'fid' => $record->fid,
'date' => $record->date,
))
->fields(array(
'count' => $record->count,
))
->expression('count', 'count + :inc', array(
':inc' => $record->count,
))
->execute();
}