function boost_admin_expiration_settings in Boost 7
Form builder; Configure boost settings.
See also
1 string reference to 'boost_admin_expiration_settings'
- boost_menu in ./
boost.module - Implements hook_menu().
File
- ./
boost.admin.expiration.inc, line 14 - Admin page callbacks for the boost module.
Code
function boost_admin_expiration_settings() {
$form['boost_ignore_flush'] = array(
'#type' => 'checkbox',
'#title' => t('Ignore a cache flush command if cron issued the request.'),
'#default_value' => variable_get('boost_ignore_flush', BOOST_IGNORE_FLUSH),
'#description' => t('Drupal will flush all caches when cron is executed, depending on the <a href="!urlcore">core minimum cache lifetime</a> setting. To ignore the request to flush the cache on cron runs, enable this option. If enabled, pages in the Boost cache will be flushed only when their <a href="!urlboost">Boost maximum cache lifetime</a> expires.', array(
'!urlcore' => url('admin/config/development/performance'),
'!urlboost' => url('admin/config/system/boost'),
)),
);
$form['boost_expire_cron'] = array(
'#type' => 'checkbox',
'#title' => t('Remove old cache files on cron.'),
'#default_value' => variable_get('boost_expire_cron', BOOST_EXPIRE_CRON),
'#description' => t('If enabled, each time cron runs Boost will check each cached page and delete those that have expired (maximum cache lifetime). The expiration time is displayed in the comment that Boost adds to the bottom of the html pages it creates. This setting is recommended for most sites.'),
);
$form['boost_cron_script_name'] = array(
'#type' => 'textfield',
'#title' => t('File name of cron script.'),
'#default_value' => variable_get('boost_cron_script_name', BOOST_CRON_SCRIPT_NAME),
'#description' => t('Enter here the name of the script used for cron (usually cron.php). This is used by Boost to determine whether or not the cache flush has been invoked by cron.'),
);
$form['boost_cron_drush_commands'] = array(
'#type' => 'textfield',
'#title' => t('Cron drush commands.'),
'#default_value' => variable_get('boost_cron_drush_commands', BOOST_CRON_DRUSH_COMMANDS),
'#description' => t('Enter here a comma separated list of the names of the drush commands used for cron (usually core-cron). This is used by Boost to determine whether or not the cache flush has been invoked by cron through drush.'),
);
// Reset htaccess on submit.
$form['#submit'][] = 'boost_form_submit_handler';
return system_settings_form($form);
}