How to use the pymemcache.serde.python_memcache_deserializer function in pymemcache

To help you get started, we’ve selected a few pymemcache examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github frerich / clcache / clcache / storage.py View on Github external
def connect(self, server):
        server = CacheMemcacheStrategy.splitHosts(server)
        assert server, "{} is not a suitable server".format(server)
        if len(server) == 1:
            clientClass = Client
            server = server[0]
        else:
            from pymemcache.client.hash import HashClient
            clientClass = HashClient
        self.client = clientClass(server, ignore_exc=True,
                                  serializer=python_memcache_serializer,
                                  deserializer=python_memcache_deserializer,
                                  timeout=5,
                                  connect_timeout=5,
                                  key_prefix=(getStringHash(self.fileStrategy.dir) + "_").encode("UTF-8")
                                 )
github django-pymemcache / django-pymemcache / djpymemcache / client.py View on Github external
def __init__(self, servers, *args, **kwargs):
        kwargs['serializer'] = python_memcache_serializer
        kwargs['deserializer'] = python_memcache_deserializer
        return super(Client, self).__init__(
            _split_host_and_port(servers), *args, **kwargs)