Ticket #9221: cache_timeout_0_bug.patch
File cache_timeout_0_bug.patch, 715 bytes (added by , 16 years ago) |
---|
-
django/middleware/cache.py
89 89 # max-age was set to 0, don't bother caching. 90 90 return response 91 91 patch_response_headers(response, timeout) 92 cache_key = learn_cache_key(request, response, timeout, self.key_prefix) 93 cache.set(cache_key, response, timeout) 92 if timeout > 0: 93 cache_key = learn_cache_key(request, response, timeout, self.key_prefix) 94 cache.set(cache_key, response, timeout) 94 95 return response 95 96 96 97 class FetchFromCacheMiddleware(object):