I\'m running Django 1.3, using Sessions Middleware and Auth Middleware:
# settings.py SESSION_ENGINE = django.contrib.sessions.backends.db # Persist sessions
This is not a direct answer, but it solves your problem and reduces DB hits to zero. With recent versions of Django you can use the cookie based session backend:
https://docs.djangoproject.com/en/dev/topics/http/sessions/#cookie-session-backend