function _update_cache_get

_update_cache_get($cid)

Retrieves data from the private update status cache table.

Parameters

$cid: The cache ID to retrieve.

Return value

An array of data for the given cache ID, or NULL if the ID was not found.

See also

_update_cache_set()

Related topics

File

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

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!update!update.module/function/_update_cache_get/7.x