diff --git a/includes/form.inc b/includes/form.inc index 3573674..f1e513b 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -559,7 +559,12 @@ function form_set_cache($form_build_id, $form, $form_state) { // table can become very large. A shorter form_cache lifetime means entries // will expire more rapidly, which should help to keep the table's size under // control. - $expire = variable_get('form_cache_expiry', 21600); + if (isset($form['#cache_expiry'])) { + $expire = $form['#cache_expiry']; + } + else { + $expire = variable_get('form_cache_expiry', 21600); + } // Ensure that the form build_id embedded in the form structure is the same as // the one passed in as a parameter. This is an additional safety measure to