3

I assumed the settings from the function system_performance_settings were stored in variables, but couldn't figure out which.

3

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 => $value) {
  if (is_array($value) && 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.

  • lazyweb has changed :P thanks for the info, that worked fine for me! – Capi Etheriel Jan 6 '12 at 12:41
  • Glad it helped. Hopefully the approach is useful for finding variables for other system settings as well. – Letharion Jan 6 '12 at 13:34
3
cache: 0
cache_lifetime: 0
page_cache_maximum_age: 0
block_cache: 0
page_compression: 0
preprocess_css: 0
preprocess_js: 0

Those were the results of @Letharion answer, disabling everything in the form.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.