Ticket #2393: cache.diff

File cache.diff, 788 bytes (added by ludo@…, 18 years ago)

patch to django/middleware/cache.py

  • usr/lib/python2.4/site-packages/django/middleware/cache.py

     
    3636        if key_prefix is None:
    3737            self.key_prefix = settings.CACHE_MIDDLEWARE_KEY_PREFIX
    3838        if cache_anonymous_only is None:
    39             self.cache_anonymous_only = settings.get('CACHE_MIDDLEWARE_ANONYMOUS_ONLY', False)
     39            try:
     40                self.cache_anonymous_only = settings.CACHE_MIDDLEWARE_ANONYMOUS_ONLY
     41            except AttributeError:
     42                self.cache_anonymous_only = False
    4043        else:
    4144            self.cache_anonymous_only = cache_anonymous_only
    4245
Back to Top