diff --git a/django/middleware/cache.py b/django/middleware/cache.py index 00b81838ec7..6f995ba0b1f 100644 --- a/django/middleware/cache.py +++ b/django/middleware/cache.py @@ -35,7 +35,7 @@ class CacheMiddleware(object): self.key_prefix = key_prefix if key_prefix is None: self.key_prefix = settings.CACHE_MIDDLEWARE_KEY_PREFIX - if cache_anonymous is None: + if cache_anonymous_only is None: self.cache_anonymous_only = settings.get('CACHE_MIDDLEWARE_ANONYMOUS_ONLY', False) else: self.cache_anonymous_only = cache_anonymous_only