_update_cache_clear

Versions
6
_update_cache_clear($cid = NULL)
7
_update_cache_clear($cid = NULL, $wildcard = FALSE)

Invalidates cached data relating to update status.

Parameters

$cid Optional cache ID of the record to clear from the private update module cache. If empty, all records will be cleared from the table.

$wildcard If $wildcard is TRUE, cache IDs starting with $cid are deleted in addition to the exact cache ID specified by $cid.

Related topics

▾ 6 functions call _update_cache_clear()

update_cache_clear_submit in modules/update/update.module
Helper function for use as a form submit callback.
update_flush_caches in modules/update/update.module
Implement hook_flush_caches().
update_project_cache in modules/update/update.compare.inc
Retrieve data from {cache_update} or empty the cache when necessary.
update_settings_submit in modules/update/update.settings.inc
Submit handler for the settings tab.
_update_process_fetch_task in modules/update/update.fetch.inc
Process a task to fetch available update data for a single project.
_update_refresh in modules/update/update.fetch.inc
Clear out all the cached available update data and initiate re-fetching.

Code

modules/update/update.module, line 833

<?php
function _update_cache_clear($cid = NULL, $wildcard = FALSE) {
  if (empty($cid)) {
    db_truncate('cache_update')->execute();
  }
  else {
    $query = db_delete('cache_update');
    if ($wildcard) {
      $query->condition('cid', $cid . '%', 'LIKE');
    }
    else {
      $query->condition('cid', $cid);
    }
    $query->execute();
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.