form_set_cache($form_build_id, $form, $form_state)
drupal/includes/form.inc, line 236
Store a form in the cache
| Name | Description |
|---|---|
| Form generation | Functions to enable the processing and display of HTML forms. |
function form_set_cache($form_build_id, $form, $form_state) {
// 6 hours cache life time for forms should be plenty.
$expire = 21600;
global $user;
if ($user->uid) {
$form['#cache_token'] = drupal_get_token();
}
cache_set('form_' . $form_build_id, $form, 'cache_form', REQUEST_TIME + $expire);
if (!empty($form_state['storage'])) {
cache_set('storage_' . $form_build_id, $form_state['storage'], 'cache_form', REQUEST_TIME + $expire);
}
}