function clients_admin_cache in Web Service Clients 7
Same name and namespace in other branches
- 6.2 clients.module \clients_admin_cache()
- 6 clients.module \clients_admin_cache()
- 7.3 clients.module \clients_admin_cache()
- 7.2 clients.module \clients_admin_cache()
Set cache time in minutes
Return value
Form array
1 string reference to 'clients_admin_cache'
- clients_menu in ./
clients.module - Implementation of hook_menu()
File
- ./
clients.module, line 197 - Clients module - handles keys and service connections and provides an API for clients
Code
function clients_admin_cache() {
$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);
}