summaryrefslogtreecommitdiff
path: root/django/utils/cache.py
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-11-03 21:29:48 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-11-03 21:29:48 +0000
commite27211a0deae2f1d402537f0ebb64ad4ccf6a4da (patch)
tree73ba55f337e0d5c6e4ed39474ab6132879cc3947 /django/utils/cache.py
parent9e724c25236b1e00a36a146e66b5deaa43d2af96 (diff)
parentcb45fd0ae20597306cd1f877efc99d9bd7cbee98 (diff)
i18n: merged to [1054] of trunkarchive/attic/i18n
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@1067 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/cache.py')
-rw-r--r--django/utils/cache.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/django/utils/cache.py b/django/utils/cache.py
index ed6e3f11ea..b36753b558 100644
--- a/django/utils/cache.py
+++ b/django/utils/cache.py
@@ -22,19 +22,19 @@ from django.conf import settings
from django.core.cache import cache
cc_delim_re = re.compile(r'\s*,\s*')
+
def patch_cache_control(response, **kwargs):
"""
This function patches the Cache-Control header by adding all
keyword arguments to it. The transformation is as follows:
- - all keyword parameter names are turned to lowercase and
- all _ will be translated to -
- - if the value of a parameter is True (exatly True, not just a
- true value), only the parameter name is added to the header
- - all other parameters are added with their value, after applying
- str to it.
+ * All keyword parameter names are turned to lowercase, and underscores
+ are converted to hyphens.
+ * If the value of a parameter is True (exactly True, not just a
+ true value), only the parameter name is added to the header.
+ * All other parameters are added with their value, after applying
+ str() to it.
"""
-
def dictitem(s):
t = s.split('=',1)
if len(t) > 1: