diff --git a/includes/form.inc b/includes/form.inc index 8ca048a..167c5d6 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -525,8 +525,11 @@ function form_get_cache($form_build_id, &$form_state) { * Stores a form in the cache. */ function form_set_cache($form_build_id, $form, $form_state) { - // 6 hours cache life time for forms should be plenty. - $expire = 21600; + // The default form cache lifetime is 6 hours. On busy sites, the cache_form + // 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); // Cache form structure. if (isset($form)) {