cache_get

Versions
4.6 – 4.7
cache_get($key)
5
cache_get($key, $table = 'cache')
6
cache_get($cid, $table = 'cache')
7
cache_get($cid, $bin = 'cache')

Return data from the persistent cache.

Parameters

$key The cache ID of the data to retrieve.

▾ 6 functions call cache_get()

archive_calendar in modules/archive.module
Generates a monthly calendar, for display in the archive block.
check_output in modules/filter.module
Run all the enabled filters on a piece of text.
locale in modules/locale.module
Provides interface translation services
menu_get_menu in includes/menu.inc
Return the menu data structure.
page_get_cache in includes/bootstrap.inc
Retrieve the current page from the cache.
variable_init in includes/bootstrap.inc
Load the persistent variable table.

Code

includes/bootstrap.inc, line 197

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