[TYPO3-core] RFC Feature #11509: Move automatic session data garbage collection to separate class

Oliver Hader oliver at typo3.org
Sun Jul 19 22:28:49 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.
> 
> 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.
> 
> -1 unless you give me a good reason. Alternative proposal: Cleanup
> fe_sessions and fe_session_data always at the same time.

Scope stays the same, but the description changes... ;-)

Solution:
Move the garbage collection of session data to a separate method. Thus,
in special cases it can be overriden by XCLASS and does not change the
regular behaviour.

See attached simple patch. Thanks!

olly
-- 
Oliver Hader
TYPO3 Release Manager 4.3


More information about the TYPO3-team-core mailing list