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_bootstrap', 'cache_field', 'cache_filter', 'cache_form', 'cache_menu', 'cache_page', 'cache_path', 'cache_update' or 'cache' for the default cache.
Return value
The cache or FALSE on failure.
Code
includes/cache.inc, line 44
<?php
function cache_get($cid, $bin = 'cache') {
return _cache_get_object($bin)->get($cid);
}
?>Login or register to post comments 