function _update_refresh

Clears out all the available update data and initiates re-fetching.

2 calls to _update_refresh()
update_manual_status in drupal/core/modules/update/update.fetch.inc
Page callback: Checks for updates and displays the update status report.
update_refresh in drupal/core/modules/update/update.module
Refreshes the release data after loading the necessary include file.

File

drupal/core/modules/update/update.fetch.inc, line 204
Code required only when fetching information about available updates.

Code

function _update_refresh() {
  module_load_include('inc', 'update', 'update.compare');

  // Since we're fetching new available update data, we want to clear
  // of both the projects we care about, and the current update status of the
  // site. We do *not* want to clear the cache of available releases just yet,
  // since that data (even if it's stale) can be useful during
  // update_get_projects(); for example, to modules that implement
  // hook_system_info_alter() such as cvs_deploy.
  Drupal::keyValueExpirable('update')
    ->delete('update_project_projects');
  Drupal::keyValueExpirable('update')
    ->delete('update_project_data');
  $projects = update_get_projects();

  // Now that we have the list of projects, we should also clear the available
  // release data, since even if we fail to fetch new data, we need to clear
  // out the stale data at this point.
  Drupal::keyValueExpirable('update_available_releases')
    ->deleteAll();
  foreach ($projects as $key => $project) {
    update_create_fetch_task($project);
  }
}