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.


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

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

Return value

The cache or FALSE on failure.

6 calls to drush_cache_get()
DrupalBoot::bootstrap_drupal_full in lib/Drush/Boot/DrupalBoot.php
Attempt to load the full Drupal system.
DrupalBoot::commandfile_searchpaths in lib/Drush/Boot/DrupalBoot.php
drush_complete_get in includes/
Retrieves from cache, or generates a listing of completion candidates of a specific type (and optionally, command).
drush_sandwich_sandwiches_served in examples/
Implements drush_hook_COMMAND().
drush_sitealias_quick_lookup_cached_alias_by_path in includes/
Look for a cached alias that points to the specified site directory. Nothing is returned if there is no matching cached alias.

... See full list


includes/, line 72
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)), LogLevel::DEBUG);
  return $ret;