Definition

cache_get($key)
drupal/includes/bootstrap.inc, line 197

Description

Return data from the persistent cache.

Parameters

$key The cache ID of the data to retrieve.

Code

function cache_get($key) {
  $cache = db_fetch_object(db_query("SELECT data, created, headers FROM {cache} WHERE cid = '%s'", $key));
  if (isset($cache->data)) {
    $cache->data = db_decode_blob($cache->data);
    return $cache;
  }
  return 0;
}