Skip to content

Commit

Permalink
[3.0.x] Improved sessions notes in deployment checklist.
Browse files Browse the repository at this point in the history
- Added note to clear old sessions when using database-backend.
- Made note to consider the cache backend more generic.
Backport of 66b0682 from master
  • Loading branch information
adamchainz authored and carltongibson committed Mar 25, 2020
1 parent 72652bc commit 76db34e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/howto/deployment/checklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ and in production. Django defaults to per-process :ref:`local-memory caching
Cache servers often have weak authentication. Make sure they only accept
connections from your application servers.

If you're using Memcached, consider using :ref:`cached sessions
<cached-sessions-backend>` to improve performance.

:setting:`DATABASES`
--------------------

Expand Down Expand Up @@ -187,6 +184,15 @@ Performance optimizations
Setting :setting:`DEBUG = False <DEBUG>` disables several features that are
only useful in development. In addition, you can tune the following settings.

Sessions
--------

Consider using :ref:`cached sessions <cached-sessions-backend>` to improve
performance.

If using database-backed sessions, regularly :ref:`clear old sessions
<clearing-the-session-store>` to avoid storing unnecessary data.

:setting:`CONN_MAX_AGE`
-----------------------

Expand Down
2 changes: 2 additions & 0 deletions docs/topics/http/sessions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ of ``request.session`` as described above in `using sessions in views`_.
Django applications which have the
:setting:`SESSION_EXPIRE_AT_BROWSER_CLOSE` setting enabled.

.. _clearing-the-session-store:

Clearing the session store
==========================

Expand Down

0 comments on commit 76db34e

Please sign in to comment.