function advagg_insert_update_db

cis7 advagg_insert_update_db($files, $type, $root)
cle7 advagg_insert_update_db($files, $type, $root)
elmsmedia7 advagg_insert_update_db($files, $type, $root)
icor7 advagg_insert_update_db($files, $type, $root)
meedjum_blog7 advagg_insert_update_db($files, $type, $root)
mooc7 advagg_insert_update_db($files, $type, $root)

Insert/Update data in advagg_files, advagg_aggregates, & advagg_aggregates_versions tables.


array $files: List of files in the aggregate as well as the aggregate name.

string $type: css or js.

int $root: Is this a root aggregate.

Return value

bool Return TRUE if anything was written to the database.

1 call to advagg_insert_update_db()
advagg_build_aggregate_plans in sites/all/modules/ulmus/advagg/
Replacement for drupal_build_css_cache() and drupal_build_js_cache().


sites/all/modules/ulmus/advagg/, line 26
Advanced CSS/JS aggregation module


function advagg_insert_update_db($files, $type, $root) {
  // Record if a database write was done.
  $write_done = FALSE;

  // Loop through all files.
  foreach ($files as $aggregate_file_name => $values) {
    // Build lock name variable.
    $lock_name = 'advagg_insert_update_db:' . $values['aggregate_filenames_hash'] . ADVAGG_SPACE . $values['aggregate_contents_hash'];

    // If lock is already acquired, return here.
    if (!lock_acquire($lock_name, 5)) {

    // Insert files into the advagg_files table if it doesn't exist.
    // Update if needed.
    if (advagg_insert_update_files($values['files'], $type)) {
      $write_done = TRUE;

    // Insert aggregate into the advagg_aggregates table if it doesn't exist.
    if (advagg_insert_aggregate($values['files'], $values['aggregate_filenames_hash'])) {
      $write_done = TRUE;

    // Insert aggregate version information into advagg_aggregates_versions.
    if (advagg_insert_aggregate_version($values['aggregate_filenames_hash'], $values['aggregate_contents_hash'], $root)) {
      $write_done = TRUE;

    // Release Lock.
  return $write_done;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.