Do this only on the settings form submit, just so that publishers don't have to do that easy-to-forget step.