function _update_cache_get

7.x update.module _update_cache_get($cid)
6.x update.module _update_cache_get($cid)

Retrieve data from the private update status cache table.

Parameters

$cid: The cache ID to retrieve.

Return value

The data for the given cache ID, or NULL if the ID was not found.

Related topics

3 calls to _update_cache_get()
update_cron in drupal-6.x/modules/update/update.module
Implementation of hook_cron().
update_get_available in drupal-6.x/modules/update/update.module
Internal helper to try to get the update information from the cache if possible, and to refresh the cache when necessary.
update_project_cache in drupal-6.x/modules/update/update.compare.inc
Retrieve data from {cache_update} or empty the cache when necessary.

File

drupal-6.x/modules/update/update.module, line 567
The "Update status" module checks for available updates of Drupal core and any installed contributed modules and themes. It warns site administrators if newer releases are available via the system status report (admin/reports/status), the…

Code

function _update_cache_get($cid) {
  $cache = db_fetch_object(db_query("SELECT data, created, expire, serialized FROM {cache_update} WHERE cid = '%s'", $cid));
  if (isset($cache->data)) {
    $cache->data = db_decode_blob($cache->data);
    if ($cache->serialized) {
      $cache->data = unserialize($cache->data);
    }
  }
  return $cache;
}