You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PyWeb-IL
Hi all,
I'm using Django and I need to log the event of session-expired. What
I mean is that after 10 minutes of no activity by the user, I want to
expire the session and write to my logs that the user was "logged-out
due to inactivity".
For that I plan to write a daemon that goes over the sessions and
delete any session that is older than 10 minutes.
My questions:
1. Has anyone done something like this?
2. Any advice on how to iterate over the current sessions on the
Django server?
3. Any advice how to delete a session?
4. Any pitfalls that I should be careful about?
Thanks,
Maor
Yishai Beeri
unread,
Apr 19, 2012, 5:54:41 AM4/19/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pywe...@googlegroups.com
Hi, Consider not deleting the sessions, but only actually expire them when you get a new request with the (inactive) session. You can check this in a middleware.