Commit 12f4db23 authored by Tim Graham's avatar Tim Graham
Browse files

[1.8.x] Fixed #25489 -- Documented that SESSION_SAVE_EVERY_REQUEST doesn't create empty sessions.

Backport of abf5ccc2 from master
parent c42e4e73
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3166,7 +3166,8 @@ Default: ``False``

Whether to save the session data on every request. If this is ``False``
(default), then the session data will only be saved if it has been modified --
that is, if any of its dictionary values have been assigned or deleted.
that is, if any of its dictionary values have been assigned or deleted. Empty
sessions won't be created, even if this setting is active.

.. setting:: SESSION_SERIALIZER

+2 −1
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ by sending repeated requests, potentially filling up the session store or
causing other users' session records to be evicted.

The :class:`~django.contrib.sessions.middleware.SessionMiddleware` has been
modified to no longer create empty session records.
modified to no longer create empty session records, including when
:setting:`SESSION_SAVE_EVERY_REQUEST` is active.

Additionally, the ``contrib.sessions.backends.base.SessionBase.flush()`` and
``cache_db.SessionStore.flush()`` methods have been modified to avoid creating
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@ by sending repeated requests, potentially filling up the session store or
causing other users' session records to be evicted.

The :class:`~django.contrib.sessions.middleware.SessionMiddleware` has been
modified to no longer create empty session records.
modified to no longer create empty session records, including when
:setting:`SESSION_SAVE_EVERY_REQUEST` is active.

Additionally, the ``contrib.sessions.backends.base.SessionBase.flush()`` and
``cache_db.SessionStore.flush()`` methods have been modified to avoid creating
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@ by sending repeated requests, potentially filling up the session store or
causing other users' session records to be evicted.

The :class:`~django.contrib.sessions.middleware.SessionMiddleware` has been
modified to no longer create empty session records.
modified to no longer create empty session records, including when
:setting:`SESSION_SAVE_EVERY_REQUEST` is active.

Bugfixes
========