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

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/complete.inc
Retrieves from cache, or generates a listing of completion candidates of a specific type (and optionally, command).
drush_sandwich_sandwiches_served in examples/sandwich.drush.inc
Implements drush_hook_COMMAND().
drush_sitealias_quick_lookup_cached_alias_by_path in includes/sitealias.inc
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

File

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