Ticket #4992: diff
File diff, 1.3 KB (added by , 17 years ago) |
---|
-
utils/cache.py
118 118 value = request.META.get(header, None) 119 119 if value is not None: 120 120 ctx.update(value) 121 return 'views.decorators.cache.cache_page.%s.%s.%s ' % (key_prefix, request.path, ctx.hexdigest())121 return 'views.decorators.cache.cache_page.%s.%s.%s.%s' % (key_prefix, request.path, request.GET, ctx.hexdigest()) 122 122 123 123 def get_cache_key(request, key_prefix=None): 124 124 """ -
middleware/cache.py
44 44 if self.cache_anonymous_only: 45 45 assert hasattr(request, 'user'), "The Django cache middleware with CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True requires authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.auth.middleware.AuthenticationMiddleware' before the CacheMiddleware." 46 46 47 if not request.method in ('GET', 'HEAD') or request.GET:47 if not request.method in ('GET', 'HEAD'): 48 48 request._cache_update_cache = False 49 49 return None # Don't bother checking the cache. 50 50