Django

Code

Changeset 4268

Show
Ignore:
Timestamp:
12/30/06 01:30:00 (2 years ago)
Author:
adrian
Message:

Fixed #3137 -- Added 'Clearing the session table' section to docs/sessions.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/sessions.txt

    r4110 r4268  
    218218a browser. 
    219219 
     220Clearing the session table 
     221========================== 
     222 
     223Note that session data can accumulate in the ``django_session`` database table 
     224and Django does *not* provide automatic purging. Therefore, it's your job to 
     225purge expired sessions on a regular basis. 
     226 
     227To understand this problem, consider what happens when a user uses a session. 
     228When a user logs in, Django adds a row to the ``django_session`` database 
     229table. Django updates this row each time the session data changes. If the user 
     230logs out manually, Django deletes the row. But if the user does *not* log out, 
     231the row never gets deleted. 
     232 
     233Django provides a sample clean-up script in ``django/bin/daily_cleanup.py``. 
     234That script deletes any session in the session table whose ``expire_date`` is 
     235in the past -- but your application may have different requirements. 
     236 
    220237Settings 
    221238========