For my site, almost every page has a title bar that says โWelcome, ABC,โ where โABCโ is the username. This means that request.user will be called for each individual query, causing the database to appear again and again.
But as soon as the user logs in, I can save his user instance in my cookie and encrypt it. This way I can avoid getting into the database repeatedly and just extract request.user from the cookie.
How could you change Django? Are there any Django plugins that do what I need?
thanks
django django-authentication django-sessions
Continuation
source share