#10646: memcached's incr and decr should throw ValueError if keys don't exist ------------------------------------------+--------------------------------- Reporter: dauerbaustelle | Owner: nobody Status: new | Milestone: Component: Uncategorized | Version: 1.0 Keywords: memcached, cache, incr, decr | Stage: Unreviewed Has_patch: 1 | ------------------------------------------+--------------------------------- The "incr" and "decr" methods of the "django.core.cache.backends.memcached.CacheClass" should throw a ValueError if the "key" to increase/decrease does not exist.
Right now, two things can happen trying to increase/decrease an invalid key, depending on the python memcached backend you're using: Using "cmemcache", you simply a `None` as return value. Using "memcache", you'll get some weird ValueErrors telling you that you cannot convert "NOT_FOUND" to an int ("memcache" tries to return the memcache server's return value as int). See the attached patch for a fix. -- Ticket URL: <http://code.djangoproject.com/ticket/10646> 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 -~----------~----~----~----~------~----~------~--~---