~ubuntu-branches/ubuntu/saucy/python-django/saucy-updates

« back to all changes in this revision

Viewing changes to docs/topics/cache.txt

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2008-11-15 19:15:33 UTC
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20081115191533-84v2zyjbmp1074ni
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
following modules:
73
73
 
74
74
    * The fastest available option is a module called ``cmemcache``, available
75
 
      at http://gijsbert.org/cmemcache/ . (This module is only compatible with
76
 
      the Django development version. Django 0.96 is only compatible with the
77
 
      second option, below.)
 
75
      at http://gijsbert.org/cmemcache/ .
78
76
 
79
77
    * If you can't install ``cmemcache``, you can install ``python-memcached``,
80
78
      available at ftp://ftp.tummy.com/pub/python-memcached/ . If that URL is
82
80
      (http://www.danga.com/memcached/) and get the Python bindings from the
83
81
      "Client APIs" section.
84
82
 
 
83
.. versionadded:: 1.0
 
84
    The ``cmemcache`` option is new in 1.0. Previously, only
 
85
    ``python-memcached`` was supported.
 
86
 
85
87
To use Memcached with Django, set ``CACHE_BACKEND`` to
86
88
``memcached://ip:port/``, where ``ip`` is the IP address of the Memcached
87
89
daemon and ``port`` is the port on which Memcached is running.
186
188
.. versionadded:: 1.0
187
189
 
188
190
While Django includes support for a number of cache backends out-of-the-box,
189
 
sometimes you will want to use a customised version or your own backend.  To
190
 
use an external cache backend with Django, use a Python import path as the
191
 
scheme portion (the part before the initial colon) of the ``CACHE_BACKEND``
192
 
URI, like so::
 
191
sometimes you might want to use a customized cache backend. To use an external
 
192
cache backend with Django, use a Python import path as the scheme portion (the
 
193
part before the initial colon) of the ``CACHE_BACKEND`` URI, like so::
193
194
 
194
195
    CACHE_BACKEND = 'path.to.backend://'
195
196
 
197
198
as reference implementations. You'll find the code in the
198
199
``django/core/cache/backends/`` directory of the Django source.
199
200
 
200
 
Note: Without a really compelling reason, like a host that doesn't support the
 
201
Note: Without a really compelling reason, such as a host that doesn't support
201
202
them, you should stick to the cache backends included with Django. They've
202
 
been really well-tested and are quite easy to use.
203
 
 
 
203
been well-tested and are easy to use.
204
204
 
205
205
CACHE_BACKEND arguments
206
206
-----------------------