#35166: Return python-memcached support
-------------------------------------+-------------------------------------
     Reporter:  Matej Spiller Muys   |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Uncategorized        |                  Version:  5.0
     Severity:  Normal               |               Resolution:
     Keywords:  memcached            |             Triage Stage:
  performance get_many               |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Matej Spiller Muys):

 We are using it as follows with latest (it should be the minimum to remove
 all the hacks):
 python-memcached==1.62


 {{{
 class MemcachedCache(django_memcached.BaseMemcachedCache):
     """An implementation of a cache binding using python-memcached"""

     def __init__(self, server, params):
         # python-memcached ≥ 1.45 returns None for a nonexistent key in
         # incr/decr(), python-memcached < 1.45 raises ValueError.
         import memcache

         super().__init__(server, params, library=memcache,
 value_not_found_exception=ValueError)
         self._options = {'pickleProtocol': pickle.HIGHEST_PROTOCOL,
 **self._options}
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35166#comment:2>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018d79920b77-5c1efeab-af6a-4113-b408-4fd9554125fa-000000%40eu-central-1.amazonses.com.

Reply via email to