Skip to content

Commit

Permalink
Fixed a long line, a typo, and a few misspellings from [9727].
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
gdub committed Jan 11, 2009
1 parent c01098e commit 11d382c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/topics/http/sessions.txt
Expand Up @@ -57,29 +57,29 @@ sure you've configured your cache; see the :ref:`cache documentation

.. warning::

You should only use cache-based sessions if you're using the Memcached cache
backend. The local-memory cache backend doesn't retain data long enough to
be a good choice, and it'll be faster to use file or database sessions
directly instead of sending everything through the file or database cache
backends.
You should only use cache-based sessions if you're using the Memcached
cache backend. The local-memory cache backend doesn't retain data long
enough to be a good choice, and it'll be faster to use file or database
sessions directly instead of sending everything through the file or
database cache backends.

Once your cache in configured, you've got two choices for how to store data in
Once your cache is configured, you've got two choices for how to store data in
the cache:

* Set :setting:`SESSION_ENGINE` to
``"django.contrib.sessions.backends.cache"`` for a simple caching session
store. Session data will be stored directly your cache. However, session
data may not be persistant: cached data can be evicted if the cache fills
data may not be persistent: cached data can be evicted if the cache fills
up or if the cache server is restarted.

* For persistant, cached data, set :setting:`SESSION_ENGINE` to
* For persistent, cached data, set :setting:`SESSION_ENGINE` to
``"django.contrib.sessions.backends.cached_db"``. This uses a
write-through cache -- every write to the cache will also be written to
the database. Session reads only use the database if the data is not
already in the cache.

Both session stores are quite fast, but the simple cache is faster because it
disreguards persistance. In most cases, the ``cached_db`` backend will be fast
disregards persistence. In most cases, the ``cached_db`` backend will be fast
enough, but if you need that last bit of performance, and are willing to let
session data be expunged from time to time, the ``cache`` backend is for you.

Expand Down

0 comments on commit 11d382c

Please sign in to comment.