1
0
mirror of https://github.com/django/django.git synced 2025-06-05 19:49:13 +00:00

Corrected an inconsistency in the documentation regarding the way to specify the locmem and dummy cache backend. Thanks to Jens Diemer for the report.

r11750 is the backport to 1.1.X of this commit. DVCS Fail.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2009-11-19 11:23:34 +00:00
parent 77755aa5a0
commit 0880fe8be4

View File

@ -179,9 +179,9 @@ Local-memory caching
If you want the speed advantages of in-memory caching but don't have the If you want the speed advantages of in-memory caching but don't have the
capability of running Memcached, consider the local-memory cache backend. This capability of running Memcached, consider the local-memory cache backend. This
cache is multi-process and thread-safe. To use it, set ``CACHE_BACKEND`` to cache is multi-process and thread-safe. To use it, set ``CACHE_BACKEND`` to
``"locmem:///"``. For example:: ``"locmem://"``. For example::
CACHE_BACKEND = 'locmem:///' CACHE_BACKEND = 'locmem://'
Note that each process will have its own private cache instance, which means no Note that each process will have its own private cache instance, which means no
cross-process caching is possible. This obviously also means the local memory cross-process caching is possible. This obviously also means the local memory
@ -199,7 +199,7 @@ various places but a development/test environment where you don't want to cache
and don't want to have to change your code to special-case the latter. To and don't want to have to change your code to special-case the latter. To
activate dummy caching, set ``CACHE_BACKEND`` like so:: activate dummy caching, set ``CACHE_BACKEND`` like so::
CACHE_BACKEND = 'dummy:///' CACHE_BACKEND = 'dummy://'
Using a custom cache backend Using a custom cache backend
---------------------------- ----------------------------
@ -249,7 +249,7 @@ In this example, ``timeout`` is set to ``60``::
In this example, ``timeout`` is ``30`` and ``max_entries`` is ``400``:: In this example, ``timeout`` is ``30`` and ``max_entries`` is ``400``::
CACHE_BACKEND = "locmem:///?timeout=30&max_entries=400" CACHE_BACKEND = "locmem://?timeout=30&max_entries=400"
Invalid arguments are silently ignored, as are invalid values of known Invalid arguments are silently ignored, as are invalid values of known
arguments. arguments.