Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session expiration time #600

Open
rpop0 opened this issue Apr 10, 2022 · 6 comments
Open

Session expiration time #600

rpop0 opened this issue Apr 10, 2022 · 6 comments
Labels

Comments

@rpop0
Copy link

rpop0 commented Apr 10, 2022

Hi,

I started using this for caching sessions in my project, but an issue I have is that they expire a bit too quickly and the users constantly have to log back in. Any way to set the expiration time for them?

@rpop0 rpop0 added the question label Apr 10, 2022
@rpop0
Copy link
Author

rpop0 commented Apr 10, 2022

It is set to the default 2 weeks but it expires multiple times per day.

@WisdomPill
Copy link
Member

WisdomPill commented Apr 10, 2022

It seems very strange to me, so I advise to take a look at expiration time using TTL command
or trying django.contrib.sessions.backends.cache_db or django.contrib.sessions.backends.db.

django-redis does not implement anything on top of django's session backends so this behaviour is implemented in django itself.

Did you add any other SESSION_* variable in settings?

please paste here any settings for cache and session to make it easy to understand the problem

@WisdomPill
Copy link
Member

@rpop0 any news about this? otherwise in a week or so I will close this

@rpop0
Copy link
Author

rpop0 commented Apr 18, 2022

No news about this, everything seems to be set correctly, but the sessions still expire prematurely.

@WisdomPill
Copy link
Member

Have you made the tests I suggested? Can you share cache related settings? Can you reproduce the issue elsewhere (demo application)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants