function drush_cache_get

8.0.x cache.inc drush_cache_get($cid, $bin = 'default')
6.x cache.inc drush_cache_get($cid, $bin = 'default')
7.x cache.inc drush_cache_get($cid, $bin = 'default')
4.x cache.drush.inc drush_cache_get($cid = NULL, $bin = NULL)
5.x cache.inc drush_cache_get($cid, $bin = 'default')
master cache.inc 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.

Parameters

$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/complete.inc
Retrieves from cache, or generates a listing of completion candidates of a specific type (and optionally, command).
_drush_add_commandfiles in includes/command.inc

File

includes/cache.inc, line 66
Drush cache API

Code

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;
}