Changeset 3603
- Timestamp:
- 08/17/06 22:31:13 (2 years ago)
- Files:
-
- django/trunk/django/middleware/cache.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/middleware/cache.py
r3414 r3603 42 42 def process_request(self, request): 43 43 "Checks whether the page is already cached and returns the cached version if available." 44 if self.cache_anonymous_only: 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 44 47 if not request.method in ('GET', 'HEAD') or request.GET: 45 48 request._cache_update_cache = False
