diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-11-19 15:39:35 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-11-19 15:39:35 +0000 |
| commit | 99d247f4cb0c22d19a4482a72a7a93584a5189da (patch) | |
| tree | ed15204640bb1f34a2627a3ce7950047e22acd82 /docs/ref/settings.txt | |
| parent | 261aee26c19a0d452847611502201088c14a1c19 (diff) | |
Fixed #13795 -- Added a site-wide cache prefix and cache versioning. Thanks to bruth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/settings.txt')
| -rw-r--r-- | docs/ref/settings.txt | 43 |
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 |
