Justin
Justin

Reputation: 2924

Where are the Drupal performance settings stored in the database?

I'm trying to find where in the database (tablename.fieldname) the settings such as "Caching mode" that appear on the Performance settings screen (/admin/settings/performance) are stored.

I've looked in the cache* tables, system, variable and performance* tables.

Upvotes: 2

Views: 2103

Answers (4)

norman.lol
norman.lol

Reputation: 5374

You could use variable_get('preprocess_css') and variable_get('preprocess_js') to retrieve the information needed, since they are stored in the variables table.

You could simply set them yourself:

  • variable_set('preprocess_css', 1) for 'on'
  • variable_set('preprocess_css', 0) for 'off'

Maybe best set them inside settings.php by adding on of the two following lines simply at the end:

  • $conf['preprocess_css'] = 1; for 'on'
  • $conf['preprocess_css'] = 0; for 'off'

Upvotes: 0

bumblebee
bumblebee

Reputation: 21

I used the variable_get() function which returns all the variables stored in the variables table.

Upvotes: 2

dusan
dusan

Reputation: 9273

In the file modules/system/system.admin.inc, inside the function system_performance_settings you can see how the "Performance settings" form is created. Check the #default attributes: there are calls to variable_get, so some settings are stored in the variables table.

Upvotes: 1

Justin
Justin

Reputation: 2924

These fields are in the "variables" table. You have to save the settings screen at least once for variables to appear.

Upvotes: 1

Related Questions