#9221: Cache Middleware wrong behavior.
--------------------------------------------+-------------------------------
Reporter: Wonlay | Owner: nobody
Status: new | Milestone:
Component: Cache system | Version: SVN
Keywords: CACHE_MIDDLEWARE_SECONDS, zero | Stage: Unreviewed
Has_patch: 1 |
--------------------------------------------+-------------------------------
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.
--
Ticket URL: <http://code.djangoproject.com/ticket/9221>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---