You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 26, 2020. It is now read-only.
I debug my django project these days, found every single request is calling authentication model query, could this too wasted. Query authentication model one time
When I using my Spring Boot project I always store the token in Redis, because redis is faster than database, in django, request.user is useful, store an object is best, I think if there is a way to store authentication model in redis as the first login time, set it's alive time, maybe few hours, time ended, data gone, when a new request come, query from redis, I think this could get an higher performance, thanks!
And if there is chance, I want to add this code.
The text was updated successfully, but these errors were encountered:
@yisen718 you can use cacheops https://github.com/Suor/django-cacheops for storing auth model in Redis. Also, I don't think we should add code for storing auth model in the cache for this repository.
would love to hear thought on this if anyone has a suggestion or comments
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I debug my django project these days, found every single request is calling authentication model query, could this too wasted.
Query authentication model one time
When I using my Spring Boot project I always store the token in Redis, because redis is faster than database, in django, request.user is useful, store an object is best, I think if there is a way to store authentication model in redis as the first login time, set it's alive time, maybe few hours, time ended, data gone, when a new request come, query from redis, I think this could get an higher performance, thanks!
And if there is chance, I want to add this code.
The text was updated successfully, but these errors were encountered: