#7460: cache tag calculates invalid key for memcached
-----------------------------------+----------------------------------------
          Reporter:  trbs          |         Owner:  nobody                     
             
            Status:  new           |     Milestone:  1.0                        
             
         Component:  Cache system  |       Version:  SVN                        
             
        Resolution:                |      Keywords:  memcached, space, problem, 
with, in, key
             Stage:  Accepted      |     Has_patch:  1                          
             
        Needs_docs:  0             |   Needs_tests:  0                          
             
Needs_better_patch:  1             |  
-----------------------------------+----------------------------------------
Changes (by mtredinnick):

  * stage:  Design decision needed => Accepted

Comment:

 The `add` method for memcache should be a separate ticket. This ticket is
 about the cache tag generating an invalid key.

 As for the cache tag, the solution is simple and I really don't understand
 need for all the discussion. When generating a cache key, make sure it
 doesn't include spaces, so that it can be inserted into memcache and make
 sure it doesn't collide with any other unique key. In other words,
 generate a valid key when constructing the cache key. There's no edge case
 or need for design decision (the ticket was already accepted. Triagers
 should not change that) or anything. There's a simple, unambiguous bug
 that should be fixed.

 Unicode, spaces or anything else aren't broken or bad and we aren't saying
 don't use them. It's a simple fact that the memcache API doesn't take
 spaces in the keys, so opinions on that are irrelevant to the issue. The
 fact that we are generating a key with spaces makes this a bug in whatever
 is generating that key, since the requirement is "no spaces" for memcache.
 So let's just fix the actual bug and move on: generate a spaceless, unique
 key when creating the key for the cache tag. Do it in such a way that
 other, similar tags might be able to use the same code if/when they are
 written.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7460#comment:11>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to