Same name and namespace in other branches
- 4.7.x includes/bootstrap.inc \cache_get()
- 5.x includes/cache.inc \cache_get()
- 6.x includes/cache.inc \cache_get()
- 6.x includes/cache-install.inc \cache_get()
- 7.x includes/cache.inc \cache_get()
Return data from the persistent cache.
Parameters
$key: The cache ID of the data to retrieve.
3 calls to cache_get()
- archive_calendar in modules/
archive.module - Generates a monthly calendar, for display in the archive block.
- locale in modules/
locale.module - Provides interface translation services
- page_get_cache in includes/
bootstrap.inc - Retrieve the current page from the cache.
File
- includes/
bootstrap.inc, line 197 - Functions that need to be loaded on every Drupal request.
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;
}