Hi,I have been going crazy for the past few days trying to understand sessions, my settings.py file as the following,SESSION_SAVE_EVERY_REQUEST=True
SESSION_COOKIE_AGE=2*60
Now whenever a request is initiated shoudn't the expiry date of the cookie i.e the one that holds the session id ,doubled i.e become four minutes. This is not happening and I am using chrome. Is this normal? I don't think so,from the amount of stackoverflow posts on this discussion.
Now towards the second part of the question, Forget about what I have said till now, now my settings.py contains only this.
SESSION_EXPIRE_AT_BROWSER_CLOSE=True.
A user "admin" has initiated a request, done some work closed his browser, session cookie holding the session id has expired and that's wonderful as expected.
Now If I run this snippet,
from django.contrib.sessions.models import Session
from django.utils import timzone
sessions = Sessions.objects.filter(expire_date__gte=timezone.now())
The above queryset has the session of the admin user, I am confused is this expected behavior? Can someone please address the queries for me.
Thank you
regards