diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-05-05 21:28:49 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-05-05 21:28:49 +0000 |
commit | 841c098fba04b76f6cee0ca6d804a777aa80e855 (patch) | |
tree | a42cb38693e835da61a0d732ad1b2705b0d9f7a2 | |
parent | 6ab934660c2abaf3350dacd0368e75f7f8fce90e (diff) | |
download | brdo-841c098fba04b76f6cee0ca6d804a777aa80e855.tar.gz brdo-841c098fba04b76f6cee0ca6d804a777aa80e855.tar.bz2 |
- Modified patch #230374 by killes, jakeg, Eaton et al: corrected problem with form API caches not being flushed. This could lead to performance issues.
-rw-r--r-- | includes/form.inc | 7 |
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); } } |