summaryrefslogtreecommitdiff
path: root/docs/ref/settings.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/settings.txt')
-rw-r--r--docs/ref/settings.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 7f4157c363..87219b228a 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -136,6 +136,25 @@ Default: ``'locmem://'``
The cache backend to use. See :doc:`/topics/cache`.
+.. setting:: CACHE_KEY_FUNCTION
+
+CACHE_KEY_FUNCTION
+------------------
+
+Default: ``None``
+
+A string containing a dotted path to a function that defines how to
+compose a prefix, version and key into a final cache key. The default
+implementation is equivalent to the function::
+
+ def make_key(key, key_prefix, version):
+ return ':'.join([key_prefix, str(version), smart_str(key)])
+
+You may use any key function you want, as long as it has the same
+argument signature.
+
+See the :ref:`cache documentation <cache_key_transformation>` for more information.
+
.. setting:: CACHE_MIDDLEWARE_ANONYMOUS_ONLY
CACHE_MIDDLEWARE_ANONYMOUS_ONLY
@@ -172,6 +191,30 @@ Default: ``600``
The default number of seconds to cache a page when the caching middleware or
``cache_page()`` decorator is used.
+.. setting:: CACHE_PREFIX
+
+CACHE_PREFIX
+------------
+
+Default: ``''`` (Empty string)
+
+A string that will be automatically included (prepended by default) to
+all cache keys used by the Django server.
+
+See the :ref:`cache documentation <cache_key_prefixing>` for more information.
+
+.. setting:: CACHE_VERSION
+
+CACHE_VERSION
+-------------
+
+Default: ``1``
+
+The default version number for cache keys generated by the Django server.
+
+See the :ref:`cache documentation <cache_versioning>` for more information.
+
+
.. setting:: CSRF_COOKIE_DOMAIN
CSRF_COOKIE_DOMAIN