function _update_cache_set

Stores data in the private update status cache table.

Parameters

$cid: The cache ID to save the data with.

$data: The data to store.

$expire: One of the following values:

See also

_update_cache_get()

Related topics

3 calls to _update_cache_set()
update_calculate_project_data in drupal/core/modules/update/update.compare.inc
Calculates the current update status of all projects on the site.
update_get_projects in drupal/core/modules/update/update.compare.inc
Fetches an array of installed and enabled projects.
_update_process_fetch_task in drupal/core/modules/update/update.fetch.inc
Processes a task to fetch available update data for a single project.

File

drupal/core/modules/update/update.module, line 766
Handles updates of Drupal core and contributed projects.

Code

function _update_cache_set($cid, $data, $expire) {
  $fields = array(
    'created' => REQUEST_TIME,
    'expire' => $expire,
  );
  if (!is_string($data)) {
    $fields['data'] = serialize($data);
    $fields['serialized'] = 1;
  }
  else {
    $fields['data'] = $data;
    $fields['serialized'] = 0;
  }
  db_merge('cache_update')
    ->key(array(
    'cid' => $cid,
  ))
    ->fields($fields)
    ->execute();
}