You are here

function esi_admin_settings_form_submit in ESI: Edge Side Includes 6.2

Clear the theme cache if the ESI Mode changed.

1 string reference to 'esi_admin_settings_form_submit'
esi_admin_settings_form in ./esi.admin.inc
Admin settings form

File

./esi.admin.inc, line 250
Admin settings for ESI.

Code

function esi_admin_settings_form_submit($form, &$form_state) {
  global $conf;
  if ($conf['esi_mode'] != $form_state['values']['esi_mode']) {
    cache_clear_all('esi:', 'cache_page', TRUE);
    cache_clear_all('esi_esi_cache:', 'cache', TRUE);
    module_invoke('system', 'theme_data');
    drupal_rebuild_theme_registry();
  }
  elseif ($conf['esi_page_cache'] != $form_state['values']['esi_page_cache']) {
    cache_clear_all('esi:', 'cache_page', TRUE);
  }
}