diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-11-26 16:25:14 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-11-26 16:25:14 +0000 |
commit | 22444f2fedf0fbe34423128ede822adc0f82e411 (patch) | |
tree | 54b19c132bf4dfb96cacc9e3309f915272bfa189 /modules/system/system.admin.inc | |
parent | 58852d4b7b72113793455b92bf113359e849e2fb (diff) | |
download | brdo-22444f2fedf0fbe34423128ede822adc0f82e411.tar.gz brdo-22444f2fedf0fbe34423128ede822adc0f82e411.tar.bz2 |
- Patch #195173 by Eaton et al: allow administrators to clear all caches.
Diffstat (limited to 'modules/system/system.admin.inc')
-rw-r--r-- | modules/system/system.admin.inc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 07168c502..230183aae 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1249,6 +1249,18 @@ function system_performance_settings() { '#description' => t("This option can interfere with module development. It is recommended to only turn this on when your site is complete."), ); + $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. <em>Warning: high-traffic sites will experience performance slowdowns while cached data is rebuilt.</em>'), + ); + + $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'; @@ -1256,6 +1268,14 @@ function system_performance_settings() { } /** + * Clear system caches. + */ +function system_clear_cache_submit(&$form_state, $form) { + drupal_flush_all_caches(); + drupal_set_message('Caches cleared.'); +} + +/** * Form builder; Configure the site file handling. * * @ingroup forms |