#4831: Adding "add" support to the cache API
-------------------------------+--------------------------------------------
   Reporter:  crazyal          |                Owner:  jacob                 
     Status:  new              |            Component:  Cache system          
    Version:  SVN              |           Resolution:                        
   Keywords:  cache memcached  |                Stage:  Design decision needed
  Has_patch:  1                |           Needs_docs:  0                     
Needs_tests:  0                |   Needs_better_patch:  0                     
-------------------------------+--------------------------------------------
Changes (by Matt McClanahan <[EMAIL PROTECTED]>):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * summary:  Adding "add" support to memcached cache_backend => Adding
              "add" support to the cache API
  * needs_docs:  => 0
  * has_patch:  0 => 1
  * stage:  Unreviewed => Design decision needed

Comment:

 One thing to note about this patch is that it exposes a bug in version
 1.36 of the python-memcached client from tummy.com.  The add method is
 missing a required argument that will need to be added if people wish to
 use add() with that memcached backend.  Example patch:
 
 {{{
 --- /usr/src/python-memcached-1.36/build/lib/memcache.py        2007-06-07
 03:30:39.000000000 -0700
 +++ memcache.py 2007-07-11 03:32:16.000000000 -0700
 @@ -365,7 +365,7 @@
              server.mark_dead(msg[1])
              return None
 
 -    def add(self, key, val, time=0):
 +    def add(self, key, val, time=0, min_compress_len=0):
          '''
          Add new key with value.
 
 @@ -374,7 +374,7 @@
          @return: Nonzero on success.
          @rtype: int
          '''
 -        return self._set("add", key, val, time)
 +        return self._set("add", key, val, time, min_compress_len)
      def replace(self, key, val, time=0, min_compress_len=0):
          '''Replace existing key with value.
 }}}

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