﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15144	Max age set in cache control no longer obeys timeout set with @cache_page decorator	Jim Dalton	nobody	"Per the documentation, I would expect the max-age value set in the Cache Control to obey the timeout value passed to `@cache_page` when that decorator is used in a view. However, at present the max_age ignores that setting and instead uses the default timeout from the cache. (As a matter of fact, it even ignores the CACHE_MIDDLEWARE_SECONDS  settings.)

I believe this is a regression, which from what I can tell, appears to have arisen in [15021]. This changeset introduced the following changes:

The following line, which originally set the value of `self.cache_timeout` at the start of  `CacheMiddleware.__init__` to `cache_timeout`, was removed:

{{{
self.cache_timeout = cache_timeout 
}}}

The following line was added to `CacheMiddleware.__init__`:

{{{
self.cache_timeout = self.cache.default_timeout 
}}}

The result is that max_age is set to the value of whatever the cache timeout setting of the cache used, rather than the value of `cache_timeout` passed into `__init__()`as it did formerly.

I wasn't able to find any background on this changeset so I couldn't determine whether this was a purposeful change in behavior for some other reason. For now, though, I can only conclude that this is a bug, since I would expect max-age to match the value of the timeout passed to cache_page."		closed	Core (Cache system)	dev		fixed	blocker, regression		Ready for checkin	1	0	0	0	0	0
