On Sun, 2008-02-17 at 06:05 -0800, char101 wrote:
> Hi,
> 
> I set my sessions lifetime to expire when the browser is closed. My
> application do not use login, the session is used to hold temporary
> data. Since there is no login, there is no logout, and the session is
> never deleted from the database.
> 
> My question is how am I going to clean the unused sessions? The
> minimum session expire time I have on the session table is a week in
> the future. It will be much easier if there is a last modified column
> in the session table, thus I only need to delete sessions which has
> not been updated for 24 hours.

This is all documented.

Look at the SESSION_EXPIRE_AT_BROWSER_CLOSE setting and the
SESSION_COOKIE_AGE setting. You don't need a last modified column, since
the expiry time is last modified + SESSION_COOKIE_AGE.

Malcolm

-- 
Everything is _not_ based on faith... take my word for it. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to