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. Data may be stored as either plain text or as serialized data. cache_get will automatically return unserialized objects and arrays.

Parameters

$cid The cache ID of the data to retrieve.

$bin The cache bin to store the data in. Valid core values are 'cache_block', 'cache_field', 'cache_filter', 'cache_form', 'cache_menu', 'cache_page', 'cache_path', 'cache_registry', 'cache_update' or 'cache' for the default cache.

Return value

The cache or FALSE on failure.

▾ 25 functions call cache_get()

archiver_get_info in includes/common.inc
Retrieve a list of all available archivers.
book_menu_subtree_data in modules/book/book.module
Get the data representing a subtree of the book hierarchy.
check_markup in modules/filter/filter.module
Run all the enabled filters on a piece of text.
drupal_get_schema in includes/bootstrap.inc
Get the schema definition of a table, or the whole database schema.
drupal_lookup_path in includes/path.inc
Given an alias, return its Drupal system URL if one exists. Given a Drupal system URL return one of its aliases if such a one exists. Otherwise, return FALSE.
drupal_page_get_cache in includes/bootstrap.inc
Retrieve the current page from the cache.
drupal_render_cache_get in includes/common.inc
Get the rendered output of a renderable element from cache.
entity_get_info in includes/common.inc
Get the entity info array of an entity type.
form_get_cache in includes/form.inc
Fetch a form from cache.
image_effect_definitions in modules/image/image.module
Pull in image effects exposed by modules implementing hook_image_effect_info().
image_styles in modules/image/image.module
Get an array of all styles and their settings.
image_style_generate in modules/image/image.module
Menu callback; Given a style and image path, generate a derivative.
locale in modules/locale/locale.module
Provides interface translation services.
menu_tree_all_data in includes/menu.inc
Get the data structure representing a named menu tree.
menu_tree_page_data in includes/menu.inc
Get the data structure representing a named menu tree, based on the current page.
module_hook_info in includes/module.inc
Retrieve a list of what hooks are explicitly declared.
module_implements in includes/module.inc
Determine which modules are implementing a hook.
simpletest_test_get_all in modules/simpletest/simpletest.module
Get a list of all of the tests provided by the system.
variable_initialize in includes/bootstrap.inc
Load the persistent variable table.
_block_render_blocks in modules/block/block.module
Render the content and subject for a set of blocks.
_field_info_collate_fields in modules/field/field.info.inc
Collate all information on existing fields and instances.
_field_info_collate_types in modules/field/field.info.inc
Collate all information on field types, widget types and related structures.
_registry_check_code in includes/bootstrap.inc
Helper to check for a resource in the registry.
_registry_rebuild in includes/registry.inc
@see registry_rebuild.
_theme_load_registry in includes/theme.inc
Get the theme_registry cache from the database; if it doesn't exist, build it.

Code

includes/cache.inc, line 43

<?php
function cache_get($cid, $bin = 'cache') {
  return _cache_get_object($bin)->get($cid);
}
?>
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.