summaryrefslogtreecommitdiff
path: root/docs/cache.txt
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2008-08-05 17:15:33 +0000
committerJustin Bronn <jbronn@gmail.com>2008-08-05 17:15:33 +0000
commitaa239e3e5405933af6a29dac3cf587b59a099927 (patch)
treeea2cbd139c9a8cf84c09e0b2008bff70e05927ef /docs/cache.txt
parent45b73c9a4685809236f84046cc7ffd32a50db958 (diff)
downloaddjango-attic/gis.tar.gz
gis: Merged revisions 7981-8001,8003-8011,8013-8033,8035-8036,8038-8039,8041-8063,8065-8076,8078-8139,8141-8154,8156-8214 via svnmerge from trunk.archive/attic/gisattic/gis
git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@8215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/cache.txt')
-rw-r--r--docs/cache.txt38
1 files changed, 23 insertions, 15 deletions
diff --git a/docs/cache.txt b/docs/cache.txt
index 3318b2ad4a..d22dd91994 100644
--- a/docs/cache.txt
+++ b/docs/cache.txt
@@ -6,8 +6,8 @@ A fundamental tradeoff in dynamic Web sites is, well, they're dynamic. Each
time a user requests a page, the Web server makes all sorts of calculations --
from database queries to template rendering to business logic -- to create the
page that your site's visitor sees. This is a lot more expensive, from a
-processing-overhead perspective, than your standard read-a-file-off-the-filesystem
-server arrangement.
+processing-overhead perspective, than your standard
+read-a-file-off-the-filesystem server arrangement.
For most Web applications, this overhead isn't a big deal. Most Web
applications aren't washingtonpost.com or slashdot.org; they're simply small-
@@ -159,19 +159,6 @@ cache is multi-process and thread-safe. To use it, set ``CACHE_BACKEND`` to
CACHE_BACKEND = 'locmem:///'
-Simple caching (for development)
---------------------------------
-
-A simple, single-process memory cache is available as ``"simple:///"``. This
-merely saves cached data in-process, which means it should only be used in
-development or testing environments. For example::
-
- CACHE_BACKEND = 'simple:///'
-
-**New in Django development version:** This cache backend is deprecated and
-will be removed in a future release. New code should use the ``locmem`` backend
-instead.
-
Dummy caching (for development)
-------------------------------
@@ -186,6 +173,27 @@ production environment still will. To activate dummy caching, set
CACHE_BACKEND = 'dummy:///'
+Using a custom cache backend
+----------------------------
+
+**New in Django development version**
+
+While Django includes support for a number of cache backends out-of-the-box,
+sometimes you will want to use a customised verison or your own backend. To
+use an external cache backend with Django, use a Python import path as the
+scheme portion (the part before the initial colon) of the ``CACHE_BACKEND``
+URI, like so::
+
+ CACHE_BACKEND = 'path.to.backend://'
+
+If you're building your own backend, you can use the standard cache backends
+as reference implementations. You'll find the code in the
+``django/core/cache/backends/`` directory of the Django source.
+
+Note: Without a really compelling reason, like a host that doesn't support the
+them, you should stick to the cache backends included with Django. They've
+been really well-tested and are quite easy to use.
+
CACHE_BACKEND arguments
-----------------------