You are here

function clients_admin_cache in Web Service Clients 7.2

Same name and namespace in other branches
  1. 6.2 clients.module \clients_admin_cache()
  2. 6 clients.module \clients_admin_cache()
  3. 7.3 clients.module \clients_admin_cache()
  4. 7 clients.module \clients_admin_cache()

Form builder for the admin settings form.

1 string reference to 'clients_admin_cache'
clients_menu in ./clients.module
Implements hook_menu()

File

./clients.module, line 200
Clients module provides a UI, storage, and an API for handling connections to remote webservices, including those provided by Services module on other Drupal sites.

Code

function clients_admin_cache($form_state) {
  $form = array();
  $form['clients_cache_time'] = array(
    '#type' => 'select',
    '#title' => t('Local cache time'),
    '#default_value' => variable_get('clients_cache_time', '0'),
    // change default in production
    '#options' => array(
      '0' => t('No cache'),
      'cron' => t('Refresh on next cron run'),
      '60' => t('1 hour'),
      '720' => t('12 hours'),
      '2880' => t('2 days'),
    ),
    '#description' => t("Minimum cache lifetime (if set, content will refresh on the next cron run after this time has elapsed)"),
    '#required' => TRUE,
  );
  return system_settings_form($form);
}