On 6/7/06, Elver Loho <[EMAIL PROTECTED]> wrote: > I think it's a bug that Django's session variables survive when the > Django development server is closed. Yes, when I close the browser, > it's nice that I can start it again and be greeted with my session. > However, when I close the server, I expect the session to be lost. > > How can I tell Django to store the sessions in memory and drop them > when the server is closed?
Django sessions are stored in the database, not in memory. That decision has its roots in the fact that Django's recommended development platform is mod_python, and mod_python processes don't share memory. Plus, the permanence of having session data in the database is just more robust; personally, I'm scared by storing important data only in memory. If you want to do this nevertheless, you can easily write a middleware class that works like Django's SessionMiddleware but saves its session data in memory. You could also check out the patch here: http://code.djangoproject.com/ticket/2066 Hope this helps, Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---