[TYPO3-core] RFC Feature #11509: Integrate possibility to define automatic garbage collection of session information

Oliver Hader oliver at typo3.org
Sun Jul 19 15:49:07 CEST 2009


Hi Michael,

Michael Stucki schrieb:
> Hi Olly,
> 
>> Problem:
>> Sessions and session data are currently cleaned up automatically and
>> randomly after 100 requests ("rand()%100"). When a frontend user session
>> is bound to the session data table, this can lead to inconsistencies
>> since one of these parts might be cleaned up without cleaning the other
>> part. The result could be a still logged in frontend user without any
>> session data containing e.g. some basket items.

Thanks for your feedback.

> I see no sense in this. If consistency is the problem, then why not just
> clean up both caches at once rather than disabling it completely?
> 
> Using such an option, the cleanup still needs to be done in some way,
> otherwise the database becomes too huge sooner or later.

As it is with many other cache_* tables in TYPO3 that keep growing and
growing (cache_pages, cache_hash, ...). A general garbage collector
would be great here. But I'd (personally) prefer to have this as cron
job and not triggered by frontend user requests.

> -1 unless you give me a good reason. Alternative proposal: Cleanup
> fe_sessions and fe_session_data always at the same time.

It depends on the disposal. A logged in frontend user and session data
can exist independently. Thus, both tables could have different
different lifetimes in general.

I'm going to provide a solution that performs fe_sessions and
fe_session_data cleanups at the same time and additionally removed
session data if the session expired (configuratble via TYPO3_CONF_VARS).

olly
-- 
Oliver Hader
TYPO3 Release Manager 4.3


More information about the TYPO3-team-core mailing list