function drush_cache_get

8.0.x drush_cache_get($cid, $bin = 'default')
6.x drush_cache_get($cid, $bin = 'default')
7.x drush_cache_get($cid, $bin = 'default')
4.x drush_cache_get($cid = NULL, $bin = NULL)
5.x drush_cache_get($cid, $bin = 'default')
master drush_cache_get($cid, $bin = 'default')

Return data from the persistent cache

Data may be stored as either plain text or as serialized data. _drush_cache_get will automatically return unserialized objects and arrays.


$cid: The cache ID of the data to retrieve.

$bin: The cache bin to store the data in.

Return value

The cache or FALSE on failure.

2 calls to drush_cache_get()
drush_complete_get in includes/
Retrieves from cache, or generates a listing of completion candidates of a specific type (and optionally, command).
_drush_add_commandfiles in includes/


includes/, line 66
Drush cache API


function drush_cache_get($cid, $bin = 'default') {
  $ret = _drush_cache_get_object($bin)->get($cid);
  $mess = $ret ? "HIT" : "MISS";
  drush_log(dt("Cache !mess cid: !cid", array('!mess' => $mess, '!cid' => $cid)), 'debug');
  return $ret;