diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-10-30 21:59:23 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-10-31 09:46:16 +0100 |
| commit | 146ed13a111c97c1c04902a6c0eda1e4ee6e604c (patch) | |
| tree | bf8c882655e1d5321448088fff0c8d5cf54f3fc0 /docs | |
| parent | 68847135bc9acb2c51c2d36797d0a85395f0cd35 (diff) | |
Fixed #17083 -- Allowed sessions to use non-default cache.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/settings.txt | 10 | ||||
| -rw-r--r-- | docs/releases/1.5.txt | 3 | ||||
| -rw-r--r-- | docs/topics/http/sessions.txt | 9 |
3 files changed, 22 insertions, 0 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index a909c12665..e8b41afb39 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -1693,6 +1693,16 @@ This is useful if you have multiple Django instances running under the same hostname. They can use different cookie paths, and each instance will only see its own session cookie. +.. setting:: SESSION_CACHE_ALIAS + +SESSION_CACHE_ALIAS +------------------- + +Default: ``default`` + +If you're using :ref:`cache-based session storage <cached-sessions-backend>`, +this selects the cache to use. + .. setting:: SESSION_COOKIE_SECURE SESSION_COOKIE_SECURE diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt index 3ee1b2d21f..e18a78afc8 100644 --- a/docs/releases/1.5.txt +++ b/docs/releases/1.5.txt @@ -299,6 +299,9 @@ Django 1.5 also includes several smaller improvements worth noting: * RemoteUserMiddleware now forces logout when the REMOTE_USER header disappears during the same browser session. +* The :ref:`cache-based session backend <cached-sessions-backend>` can store + session data in a non-default cache. + Backwards incompatible changes in 1.5 ===================================== diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt index d9c472d092..baf8aa5cb5 100644 --- a/docs/topics/http/sessions.txt +++ b/docs/topics/http/sessions.txt @@ -45,6 +45,8 @@ If you want to use a database-backed session, you need to add Once you have configured your installation, run ``manage.py syncdb`` to install the single database table that stores session data. +.. _cached-sessions-backend: + Using cached sessions --------------------- @@ -62,6 +64,13 @@ sure you've configured your cache; see the :doc:`cache documentation sessions directly instead of sending everything through the file or database cache backends. +If you have multiple caches defined in :setting:`CACHES`, Django will use the +default cache. To use another cache, set :setting:`SESSION_CACHE_ALIAS` to the +name of that cache. + +.. versionchanged:: 1.5 + The :setting:`SESSION_CACHE_ALIAS` setting was added. + Once your cache is configured, you've got two choices for how to store data in the cache: |
