Is there a hook function for a module's settings form being submitted?
You can implement hook_form_alter or hook_form_FORM_ID_alter and add a custom submit handler to the form in which you can clear the session data. It would look something like this:

&lt;?php
function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {   
  if ($form_id == "some_form") {
    $form['#submit'][] = 'mymodule_some_form_submit';
  }
}

function mymodule_some_form_submit($form, &amp;$form_state){
  // Do your fancy stuff here.
}
?&gt;


This example implements hook_form_alter. If you only have one form to alter, I recommend using hook_form_FORM_ID_alter because it results in cleaner code.