_update_cache_get

Versions
6 – 7
_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 functions call _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.

Code

modules/update/update.module, line 567

<?php
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;
}
?>
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.