Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By mpdonadio on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
7.x
Introduced in version:
7.61
Issue links:
Description:
In Drupal 7, the expiration for entries in the {cache_form}
database table was previously hardcoded to be 21600 second (6 hours). This is now configurable in settings.php:
/**
* Expiration of cache_form entries:
*
* Drupal's Form API stores details of forms in cache_form and these entries are
* kept for at least 6 hours by default. Expired entries are cleared by cron.
* Busy sites can encounter problems with the cache_form table becoming very
* large. It's possible to mitigate this by setting a shorter expiration for
* cached forms. In some cases it may be desirable to set a longer cache
* expiration, for example to prolong cache_form entries for Ajax forms in
* cached HTML.
*
* @see form_set_cache()
* @see system_cron()
* @see ajax_get_form()
*/
# $conf['form_cache_expiration'] = 21600;
Impacts:
Site builders, administrators, editors
Module developers