#10016: Cache middleware with memcached can't handle long URLs
--------------------------+-------------------------------------------------
 Reporter:  jacob         |       Owner:  nobody    
   Status:  new           |   Milestone:            
Component:  Cache system  |     Version:  1.0       
 Keywords:                |       Stage:  Unreviewed
Has_patch:  0             |  
--------------------------+-------------------------------------------------
 Memcached has a hard limit of 250 characters for cache keys
 ([http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt
 cite]). However, cache keys for the cache middleware (and associated view
 decorators) are of the form

 {{{
    'views.decorators.cache.cache_page.%s.%s.%s' % (key_prefix,
 request.path, headers_hash)
 }}}

 ([http://code.djangoproject.com/browser/django/trunk/django/utils/cache.py#L146
 cite])

 This means that if the combined length of
 {{{settings.CACHE_MIDDLEWARE_KEY_PREFIX}}} and {{{request.path}}} is over
 about 180 characters, you'll get failures. With cmemcache you get obscure
 server errors; the pure-Python memcached client throws
 {{{MemcachedKeyLengthError}}}.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10016>
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to