Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.303
diff -u -p -r1.303 system.admin.inc
--- modules/system/system.admin.inc	11 Sep 2010 03:00:26 -0000	1.303
+++ modules/system/system.admin.inc	14 Sep 2010 12:30:22 -0000
@@ -1250,12 +1250,16 @@ function system_modules_submit($form, &$
     drupal_set_message(t('The configuration options have been saved.'));
   }
 
-  // Clear all caches. We need to invoke drupal_flush_all_caches() to ensure
-  // that also dependent caches are flushed, e.g. the filter cache and field
-  // cache, and also registered themes are rebuilt, since modules can also
-  // register themes.
-  drupal_flush_all_caches();
+  // Clear all caches.
+  registry_rebuild();
+  system_rebuild_theme_data();
+  drupal_theme_rebuild();
+  node_types_rebuild();
+  menu_rebuild();
+  cache_clear_all('schema', 'cache');
   entity_info_cache_clear();
+  drupal_clear_css_cache();
+  drupal_clear_js_cache();
 
   $form_state['redirect'] = 'admin/modules';
 
