summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/form.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 83a59fb31..bb02accab 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -232,11 +232,12 @@ function form_get_cache($form_build_id, &$form_state) {
* Store a form in the cache
*/
function form_set_cache($form_build_id, $form, $form_state) {
- $expire = max(ini_get('session.cookie_lifetime'), 86400);
+ // 6 hours cache life time for forms should be plenty.
+ $expire = 21600;
- cache_set('form_' . $form_build_id, $form, 'cache_form', $expire);
+ cache_set('form_' . $form_build_id, $form, 'cache_form', time() + $expire);
if (!empty($form_state['storage'])) {
- cache_set('storage_' . $form_build_id, $form_state['storage'], 'cache_form', $expire);
+ cache_set('storage_' . $form_build_id, $form_state['storage'], 'cache_form', time() + $expire);
}
}