﻿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
9221	Cache Middleware wrong behavior.	Wonlay	nobody	"When the CACHE_MIDDLEWARE_SECONDS setting is set to zero,

UpdateCacheMiddleware will set a cache item which timeout is 300.

{{{
# This line pass timeout=0.
cache.set(cache_key, response, timeout)

# But in django/core/cache/backends/memcached.py:
self._cache.set(smart_str(key), value, timeout or self.default_timeout)
# will set the timeout to self.default_timeout, which is 300.
}}}

Actually, if CACHE_MIDDLEWARE_SECONDS=0 there is no need to call cache.set(...
Only patch the header max_age to 0 will be OK.

And my patch attached."		closed	Core (Cache system)	dev		fixed	CACHE_MIDDLEWARE_SECONDS, zero	wonlay@…	Unreviewed	1	0	0	0	0	0
