Author: adrian Date: 2006-12-30 01:30:00 -0600 (Sat, 30 Dec 2006) New Revision: 4268
Modified: django/trunk/docs/sessions.txt Log: Fixed #3137 -- Added 'Clearing the session table' section to docs/sessions.txt Modified: django/trunk/docs/sessions.txt =================================================================== --- django/trunk/docs/sessions.txt 2006-12-30 07:21:01 UTC (rev 4267) +++ django/trunk/docs/sessions.txt 2006-12-30 07:30:00 UTC (rev 4268) @@ -217,6 +217,23 @@ her browser. Use this if you want people to have to log in every time they open a browser. +Clearing the session table +========================== + +Note that session data can accumulate in the ``django_session`` database table +and Django does *not* provide automatic purging. Therefore, it's your job to +purge expired sessions on a regular basis. + +To understand this problem, consider what happens when a user uses a session. +When a user logs in, Django adds a row to the ``django_session`` database +table. Django updates this row each time the session data changes. If the user +logs out manually, Django deletes the row. But if the user does *not* log out, +the row never gets deleted. + +Django provides a sample clean-up script in ``django/bin/daily_cleanup.py``. +That script deletes any session in the session table whose ``expire_date`` is +in the past -- but your application may have different requirements. + Settings ======== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
