With ``contrib.sessions`` installed and ``SessionMiddleware`` in use, I 
noticed that when Django session cookie is set the ``django_session`` table 
is queried on every request, regardless of whether any session data is used 
during the request cycle. Making the ``session`` attribute of request a 
lazy object would represent an optimization in the following 2 cases, both 
of which are the same, in effect:

1) User logs in to perform login-required tasks, then visits pages that 
don't require login
2) User logs in to perform login-required tasks, logs out, then visits 
pages that don't require login

Would this sort of change be backward-incompatible?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-developers/-/uXBhKovPew4J.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to