diff -urp --strip-trailing-cr ../drupal-6.x-dev/includes/common.inc ./includes/common.inc
--- ../drupal-6.x-dev/includes/common.inc	2007-11-23 14:34:55.000000000 +0100
+++ ./includes/common.inc	2007-11-25 19:50:44.000000000 +0100
@@ -3536,3 +3536,21 @@ function drupal_implode_tags($tags) {
   return implode(', ', $encoded_tags);
 }
 
+/**
+ * Flush all cached data on the site.
+ *
+ * Empties cache tables, rebuilds the menu cache and theme registries, and
+ * exposes a hook for other modules to clear their own cache data as well.
+ */
+function drupal_flush_caches() {
+  $core = array('cache', 'cache_block', 'cache_filter', 'cache_form', 'cache_page');
+  $cache_tables = array_merge($core, module_invoke_all('flush_caches'));
+  foreach ($cache_tables as $table) {
+    cache_clear_all('*', $table, TRUE);
+  }
+
+  drupal_clear_css_cache();
+  drupal_clear_js_cache();
+  drupal_rebuild_theme_registry();
+  menu_rebuild();
+}
diff -urp --strip-trailing-cr ../drupal-6.x-dev/modules/system/system.admin.inc ./modules/system/system.admin.inc
--- ../drupal-6.x-dev/modules/system/system.admin.inc	2007-11-23 16:36:44.000000000 +0100
+++ ./modules/system/system.admin.inc	2007-11-25 20:08:41.000000000 +0100
@@ -1263,6 +1263,18 @@ function system_performance_settings() {
     '#description' => t('Enable this setting to determine the correct IP address of the remote client by examining information stored in the X-Forwarded-For headers. X-Forwarded-For headers are a standard mechanism for identifying client systems connecting through a reverse proxy server, such as Squid or Pound. Reverse proxy servers are often used to enhance the performance of heavily visited sites and may also provide other site caching, security or encryption benefits. If this Drupal installation operates behind a reverse proxy, this setting should be enabled so that correct IP address information is captured in Drupal\'s session management, logging, statistics and access management systems; if you are unsure about this setting, do not have a reverse proxy, or Drupal operates in a shared hosting environment, this setting should be set to disabled.'),
   );
 
+  $form['clear_cache'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Clear cached data'),
+    '#description' => t('Caching data improves performance, but may cause problems while troubleshooting new modules, themes, or translations, if outdated information has been cached. To refresh all cached data on your site, click the button below. %warning', array('%warning' => t('Warning: high-traffic sites will experience performance slowdowns while cached data is rebuilt.'))),
+  );
+
+  $form['clear_cache']['cache'] = array(
+    '#type' => 'submit',
+    '#value' => t('Clear cached data'),
+    '#submit' => array('system_clear_cache_submit'),
+  );
+
   $form['#submit'][] = 'drupal_clear_css_cache';
   $form['#submit'][] = 'drupal_clear_js_cache';
 
@@ -1270,6 +1282,14 @@ function system_performance_settings() {
 }
 
 /**
+ * Clear system caches.
+ */
+function system_clear_cache_submit(&$form_state, $form) {
+  drupal_flush_caches();
+  drupal_set_message('Caches cleared.');
+}
+
+/**
  * Form builder; Configure the site file handling.
  *
  * @ingroup forms
