Where are Cache settings stored? I assumed the settings from the function system_performance_settings were stored in variables, but couldn't figure out which.
If you trace the code from the system_performance_settings, you'll see that is uses system_settings_form for form generation, which uses system_settings_form_submit form submit handling, which in turn does

foreach ($form_state['values'] as $key =&gt; $value) {
  if (is_array($value) &amp;&amp; isset($form_state['values']['array_filter'])) {
     $value = array_keys(array_filter($value));
  }
  variable_set($key, $value);
}


So to find any individual variable name, your best bet is to

drupal_set_message($key);


in that function.