Changeset 8215 for django/branches/gis/django/utils/cache.py
- Timestamp:
- 08/05/08 12:15:33 (5 months ago)
- Files:
-
- django/branches/gis (modified) (1 prop)
- django/branches/gis/django/utils/cache.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/gis
- Property svnmerge-integrated changed from /django/trunk:1-7978 to /django/trunk:1-8214
django/branches/gis/django/utils/cache.py
r7768 r8215 18 18 """ 19 19 20 import md521 20 import re 22 21 import time … … 30 29 from django.utils.encoding import smart_str, iri_to_uri 31 30 from django.utils.http import http_date 31 from django.utils.hashcompat import md5_constructor 32 32 33 33 cc_delim_re = re.compile(r'\s*,\s*') … … 105 105 cache_timeout = 0 # Can't have max-age negative 106 106 if not response.has_header('ETag'): 107 response['ETag'] = '"%s"' % md5 .new(response.content).hexdigest()107 response['ETag'] = '"%s"' % md5_constructor(response.content).hexdigest() 108 108 if not response.has_header('Last-Modified'): 109 109 response['Last-Modified'] = http_date() … … 139 139 def _generate_cache_key(request, headerlist, key_prefix): 140 140 """Returns a cache key from the headers given in the header list.""" 141 ctx = md5 .new()141 ctx = md5_constructor() 142 142 for header in headerlist: 143 143 value = request.META.get(header, None)
