Index: admin_menu.module
===================================================================
--- admin_menu.module	(revision 3866)
+++ admin_menu.module	(working copy)
@@ -130,10 +130,30 @@
   if (!user_access('access administration menu') || admin_menu_suppress(FALSE)) {
     return;
   }
-
-  $content  = '<div id="admin-menu">';
-  $content .= admin_menu_tree_output(menu_tree_all_data('admin_menu'));
-  $content .= '</div>';
+  
+  global $user, $language;
+  
+  $cache_server_enabled = variable_get('admin_menu_cache_server', TRUE);
+  $cid = 'admin_menu:' . $user->uid . ':' . $language->language;
+  
+  // Try to load and output administration menu from server-side cache.
+  if ($cache_server_enabled) {
+    $cache = cache_get($cid, 'cache_menu');
+    if ($cache && isset($cache->data)) {
+      $content = $cache->data;
+    }
+  }
+  
+  if (!$content) {     
+    $content  = '<div id="admin-menu">';
+    $content .= admin_menu_tree_output(menu_tree_all_data('admin_menu'));
+    $content .= '</div>';
+ 
+    // Cache the menu for this user.
+    if ($cache_server_enabled) {
+      cache_set($cid, $content, 'cache_menu');
+    }
+  }
   return $content;
 }
 
@@ -236,6 +256,8 @@
  */
 function admin_menu_menu_alter() {
   admin_menu_rebuild_links(TRUE);
+  // Flush client-side caches whenever the menu is rebuilt.
+  admin_menu_flush_caches();
 }
 
 function admin_menu_rebuild_links($new_value = NULL) {
@@ -320,6 +342,30 @@
 }
 
 /**
+ * Implements hook_flush_caches().
+ *
+ * Flush client-side caches.
+ */
+function admin_menu_flush_caches() {
+  // Flush cached output of admin_menu.
+  cache_clear_all('admin_menu:', 'cache_menu', TRUE);
+  // Flush client-side cache hashes.
+  // db_table_exists() required for SimpleTest.
+  if (db_table_exists('cache_admin_menu')) {
+    cache_clear_all('*', 'cache_admin_menu', TRUE);
+  }
+}
+
+/**
+ * Implements hook_form_FORM_ID_alter().
+ *
+ * Form submit handler to flush client-side cache hashes when clean URLs are toggled.
+ */
+function admin_menu_form_system_clean_url_settings_alter(&$form, $form_state) {
+  $form['#submit'][] = 'admin_menu_flush_caches';
+}
+
+/**
  * Render an icon to display in the Administration Menu.
  *
  * @ingroup themeable
Index: admin_menu.inc
===================================================================
--- admin_menu.inc	(revision 3866)
+++ admin_menu.inc	(working copy)
@@ -373,6 +373,12 @@
  * Form builder function for module settings.
  */
 function admin_menu_theme_settings() {
+  $form['admin_menu_cache_server'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Enable caching'),
+    '#default_value' => variable_get('admin_menu_cache_server', TRUE),
+    '#description' => t('If enabled, the admin menu output is cached per user and language'),
+  );
   $form['admin_menu_margin_top'] = array(
     '#type' => 'checkbox',
     '#title' => t('Adjust top margin'),
