You are here

function boost_expire_admin_settings in Boost Expire 7

Configuration form for Boost Expire.

1 string reference to 'boost_expire_admin_settings'
boost_expire_menu in ./boost_expire.module
Implements hook_menu().

File

./boost_expire.module, line 127
Expires Boost caches automatically when certain Drupal actions are taken.

Code

function boost_expire_admin_settings() {
  $minimum_cache_lifetime = variable_get('cache_lifetime') / 60;

  // Minutes
  $performance_page = l('performance', 'admin/config/development/performance');
  $form['boost_expire_respect_minimum_cache_lifetime'] = array(
    '#type' => 'checkbox',
    '#title' => format_plural($minimum_cache_lifetime, 'Respect Minimum cache lifetime (1 minute)', 'Respect Minimum cache lifetime (@count minutes)'),
    '#default_value' => variable_get('boost_expire_respect_minimum_cache_lifetime', 0),
    '#description' => t('Only flush caches after the minimum cache lifetime has passed. Minimum cache lifetime can be set on the !performance page.', array(
      '!performance' => $performance_page,
    )),
  );
  $form['boost_expire_log_flushes'] = array(
    '#type' => 'checkbox',
    '#title' => t('Log Cache Flushes'),
    '#default_value' => variable_get('boost_expire_log_flushes', 1),
    '#description' => t('Writes an entry to the watchdog log every time Boost Expire flushes the Boost static cache.'),
  );
  return system_settings_form($form);
}