From 841c098fba04b76f6cee0ca6d804a777aa80e855 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 5 May 2008 21:28:49 +0000 Subject: - Modified patch #230374 by killes, jakeg, Eaton et al: corrected problem with form API caches not being flushed. This could lead to performance issues. --- includes/form.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'includes') 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); } } -- cgit v1.2.3