Index: admin_menu.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.inc,v
retrieving revision 1.11.2.11
diff -u -p -r1.11.2.11 admin_menu.inc
--- admin_menu.inc	22 Oct 2008 05:50:43 -0000	1.11.2.11
+++ admin_menu.inc	23 Oct 2008 09:04:28 -0000
@@ -213,6 +213,30 @@ function admin_menu_admin_menu(&$deleted
     }
   }
 
+  // Add clear-cache.
+  $links[] = array(
+    'title' => 'Empty cache',
+    'path' => 'admin_menu/flush-cache',
+    'query' => 'destination',
+    'weight' => 20,
+    'parent_path' => $icon_path,
+  );
+  $caches = array(
+    'admin_menu' => 'Administration menu',
+    'data' => 'All data caches',
+    'menu' => 'Menu',
+    'requisites' => 'Page requisites',
+    'theme' => 'Theme registry',
+  );
+  foreach ($caches as $name => $title) {
+    $links[] = array(
+      'title' => $title,
+      'path' => 'admin_menu/flush-cache/' . $name,
+      'query' => 'destination',
+      'parent_path' => 'admin_menu/flush-cache',
+    );
+  }
+
   // Add devel module links
   if (module_exists('devel')) {
     // Add variable editor.
@@ -222,13 +246,6 @@ function admin_menu_admin_menu(&$deleted
       'weight' => 20,
       'parent_path' => $icon_path,
     );
-    // Add clear-cache.
-    $links[] = array(
-      'title' => 'Empty cache',
-      'path' => 'devel/cache/clear',
-      'weight' => 20,
-      'parent_path' => $icon_path,
-    );
     // Add switch_user items.
     if ($devel_user_links = module_invoke('devel', 'switch_user_list')) {
       foreach ($devel_user_links as $link) {
@@ -455,3 +472,52 @@ function admin_menu_toggle_modules() {
   drupal_goto('');
 }
 
+/**
+ * Flush all caches or a specific one.
+ *
+ * @param $name
+ *   (optional) Name of cache to flush.
+ */
+function admin_menu_flush_cache($name = NULL) {
+  switch ($name) {
+    case 'admin_menu':
+      admin_menu_wipe();
+      break;
+
+    case 'data':
+      // Don't clear cache_form - in-progress form submissions may break.
+      // Ordered so clearing the page cache will always be the last action.
+      $core = array('cache', 'cache_block', 'cache_filter', 'cache_page');
+      $cache_tables = array_merge(module_invoke_all('flush_caches'), $core);
+      foreach ($cache_tables as $table) {
+        cache_clear_all('*', $table, TRUE);
+      }
+      break;
+
+    case 'menu':
+      module_invoke('menu', 'rebuild');
+      break;
+
+    case 'requisites':
+      // Change query-strings on css/js files to enforce reload for all users.
+      _drupal_flush_css_js();
+
+      drupal_clear_css_cache();
+      drupal_clear_js_cache();
+      break;
+
+    case 'theme':
+      module_invoke('system', 'theme_data');
+      drupal_rebuild_theme_registry();
+      break;
+
+    default:
+      // Flush all caches; no need to re-implement this.
+      module_load_include('inc', 'system', 'system.admin');
+      $form_state = array();
+      system_clear_cache_submit($form_state, NULL);
+      break;
+  }
+  drupal_goto();
+}
+
Index: admin_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.module,v
retrieving revision 1.43.2.7
diff -u -p -r1.43.2.7 admin_menu.module
--- admin_menu.module	9 Sep 2008 14:39:01 -0000	1.43.2.7
+++ admin_menu.module	23 Oct 2008 09:04:36 -0000
@@ -75,6 +75,12 @@ function admin_menu_menu() {
     'type' => MENU_CALLBACK,
     'file' => 'admin_menu.inc',
   );
+  $items['admin_menu/flush-cache'] = array(
+    'page callback' => 'admin_menu_flush_cache',
+    'access arguments' => array('administer site configuration'),
+    'type' => MENU_CALLBACK,
+    'file' => 'admin_menu.inc',
+  );
   return $items;
 }
 
