You are here

function _update_cache_get in Drupal 6

Same name and namespace in other branches
  1. 7 modules/update/update.module \_update_cache_get()

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 modules/update/update.module
Implementation of hook_cron().
update_get_available in 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 modules/update/update.compare.inc
Retrieve data from {cache_update} or empty the cache when necessary.

File

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;
}