Currently the form cache has a lifetime of 6 hours by default.
I'd like to see the possibility to define a cache lifetime by using relative date formats like in php's strtotime.
Further it would be nice to be able to set the form cache expiration per form - e.g. with
$form_state['cache_expire'] (Another solution could be to store this information straight into
The goal I've in mind is to be able to get the lifetime of the page cache and the form cache in sync (The page cache is a whole different story ;) )
The scenario I think of is a website where all the pages, including the forms on it, are cacheable until tomorrow (midnight). But if the form cache is cleared before the page cache things break e.g. the ajax magic.
The attached patch contains the changes needed to introduce a custom form lifetime. The setting can be found in
|PASSED: [[SimpleTest]]: [MySQL] 33,970 pass(es).|
|PASSED: [[SimpleTest]]: [MySQL] 33,798 pass(es).|
|PASSED: [[SimpleTest]]: [MySQL] 33,811 pass(es).|
|FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-allow-custom-form-cache-expiration-1286154-11-d8.patch. Unable to apply patch. See the log in the details link for more information.|
|PASSED: [[SimpleTest]]: [MySQL] 36,880 pass(es).|