function drush_complete_cache_set

8.0.x complete.inc drush_complete_cache_set($complete)
6.x complete.inc drush_complete_cache_set($complete)
7.x complete.inc drush_complete_cache_set($complete)
5.x complete.inc drush_complete_cache_set($complete)
master complete.inc drush_complete_cache_set($complete)

Stores caches for completions.

Parameters

$complete: A structured array of completions, keyed by type, including a 'commands' type that contains all commands with command specific completions keyed by type. The array does not need to include all types - used by drush_complete_rebuild_arguments().

2 calls to drush_complete_cache_set()
drush_complete_rebuild in includes/complete.inc
Rebuild and cache completions for everything except command arguments.
drush_complete_rebuild_arguments in includes/complete.inc
Rebuild and cache completions for command arguments.

File

includes/complete.inc, line 492
Provide completion output for shells.

Code

function drush_complete_cache_set($complete) {
  foreach ($complete as $type => $values) {
    if ($type == 'commands') {
      foreach ($values as $command_name => $command) {
        foreach ($command as $command_type => $command_values) {
          drush_cache_set(drush_complete_cache_cid($command_type, $command_name), $command_values, 'complete', DRUSH_CACHE_TEMPORARY);
        }
      }
    }
    else {
      drush_cache_set(drush_complete_cache_cid($type), $values, 'complete', DRUSH_CACHE_TEMPORARY);
    }
  }
}