Ticket #4992: diff

File diff, 1.3 KB (added by anonymous, 8 years ago)

patch

  • utils/cache.py

     
    118118        value = request.META.get(header, None)
    119119        if value is not None:
    120120            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())
    122122
    123123def get_cache_key(request, key_prefix=None):
    124124    """
  • middleware/cache.py

     
    4444        if self.cache_anonymous_only:
    4545            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."
    4646
    47         if not request.method in ('GET', 'HEAD') or request.GET:
     47        if not request.method in ('GET', 'HEAD'):
    4848            request._cache_update_cache = False
    4949            return None # Don't bother checking the cache.
    5050
Back to Top