- Patch #804328 by jcfiala, David_Rothstein: 'Compress cached pages'-setting should always clear cache on toggle.
parent
58a8be92bc
commit
18693269b4
|
@ -1694,6 +1694,9 @@ function system_performance_settings() {
|
||||||
|
|
||||||
$form['#submit'][] = 'drupal_clear_css_cache';
|
$form['#submit'][] = 'drupal_clear_css_cache';
|
||||||
$form['#submit'][] = 'drupal_clear_js_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);
|
return system_settings_form($form);
|
||||||
}
|
}
|
||||||
|
@ -1708,6 +1711,15 @@ function system_clear_cache_submit($form, &$form_state) {
|
||||||
drupal_set_message(t('Caches cleared.'));
|
drupal_set_message(t('Caches cleared.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* Form builder; Configure the site file handling.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue