summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-07-28 02:57:36 +0000
committerDries Buytaert <dries@buytaert.net>2010-07-28 02:57:36 +0000
commit18693269b4311c7acbf7853ae70a0e305a0ae4b8 (patch)
tree36d0707ae2a98f9a9df2cbf5ebc98a8c6b544d8b /modules/system
parent58a8be92bc8fe2dd5316810ba92d3a8f8cdb1f33 (diff)
downloadbrdo-18693269b4311c7acbf7853ae70a0e305a0ae4b8.tar.gz
brdo-18693269b4311c7acbf7853ae70a0e305a0ae4b8.tar.bz2
- Patch #804328 by jcfiala, David_Rothstein: 'Compress cached pages'-setting should always clear cache on toggle.
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.admin.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 08f2240b0..ff6a09026 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1694,6 +1694,9 @@ function system_performance_settings() {
$form['#submit'][] = 'drupal_clear_css_cache';
$form['#submit'][] = 'drupal_clear_js_cache';
+ // This form allows page compression settings to be changed, which can
+ // invalidate the page cache, so it needs to be cleared on form submit.
+ $form['#submit'][] = 'system_clear_page_cache_submit';
return system_settings_form($form);
}
@@ -1709,6 +1712,15 @@ function system_clear_cache_submit($form, &$form_state) {
}
/**
+ * Submit callback; clear the page cache.
+ *
+ * @ingroup forms
+ */
+function system_clear_page_cache_submit($form, &$form_state) {
+ cache_clear_all('*', 'cache_page', TRUE);
+}
+
+/**
* Form builder; Configure the site file handling.
*
* @ingroup forms