I just found in table {cache_form} there are much data of form_state. After checking the codes of include/form.inc file, I guess system cannot delete this kind of cache data...
This is the line setting the cache:
cache_set('form_state_' . $form_build_id, $data, 'cache_form', REQUEST_TIME + $expire);
I cannot find any line about clearing such cache, instead I found this:
cache_clear_all('storage_' . $form_state['values']['form_build_id'], 'cache_form');
So i guess the 'storage_' should be 'form_state_' here?
Comments
Comment #1
Anonymous (not verified) commentedthis is probably a duplicate of #512026: Move $form_state storage from cache to new state/key-value system. have a read of that, and reopen this issue if think its not a duplicate.
Comment #2
eric_a commented#512026: Move $form_state storage from cache to new state/key-value system is about table renaming.
This cache id problem is reported in two other issues I know of:
#738132: form API doesn't properly update its cache
#791168: Does form_state cache never get cleaned?