#5176: Bug in django.utils.cache_generate_cache_key(request, headerlist,
key_prefix)
-----------------------+----------------------------------------------------
Reporter: Eratothene | Owner: jacob
Status: new | Component: Cache system
Version: SVN | Keywords: cache session
Stage: Unreviewed | Has_patch: 1
-----------------------+----------------------------------------------------
Checked on latest SVN[[BR]]
If the !Order of middlewares goes like this:[[BR]]
'django.middleware.cache.!CacheMiddleware',[[BR]]
'django.contrib.sessions.middleware.!SessionMiddleware', [[BR]]
[[BR]]
And I want the order to be exactly like this, because !SessionMiddleware
adds Vary on Cookie where appropriate.
Django dies on every request, which actually varyies on cookies.
Generate_cache_key tries to get cookie into the cache key, what
is exactly what I want, but fails as it expects string not a
!SimpleCookie. Path is trivial though..
{{{
File "/usr/local/lib/python2.5/site-
packages/django/middleware/cache.py", line 82, in process_response
cache_key = learn_cache_key(request, response, self.cache_timeout,
self.key_prefix)
File "/usr/local/lib/python2.5/site-packages/django/utils/cache.py",
line 163, in learn_cache_key
return _generate_cache_key(request, headerlist, key_prefix)
File "/usr/local/lib/python2.5/site-packages/django/utils/cache.py",
line 120, in _generate_cache_key
ctx.update(value)
TypeError: update() argument 1 must be string or read-only buffer, not
SimpleCookie
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/5176>
Django Code <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
-~----------~----~----~----~------~----~------~--~---