$type)), 'success'); } else { $choice = drush_choice($types, 'Enter a number to choose which cache to clear.', '!key'); if ($choice !== FALSE) { call_user_func($types[$choice]); drush_log(dt("'!name' cache was cleared", array('!name' => $choice)), 'success'); } } break; } } function drush_cache_clear_types() { $types = array( 'all' => 'drupal_flush_all_caches', 'theme' => 'drush_cache_clear_theme_registry', 'menu' => 'menu_rebuild', 'css+js' => 'drush_cache_clear_css_js', ); if (count(module_implements('node_grants'))) { $types['nodeaccess'] = 'node_access_rebuild'; } return $types; } function drush_cache_clear_theme_registry() { drush_db_delete('cache', 'cid LIKE :theme_registry', array(':theme_registry' => 'theme_registry%')); } function drush_cache_clear_css_js() { _drupal_flush_css_js(); drupal_clear_css_cache(); drupal_clear_js_cache(); }