Ticket #15815: pylibmc-binary.diff

File pylibmc-binary.diff, 656 bytes (added by Mike Tigas, 14 years ago)
  • django/core/cache/backends/memcached.py

    diff --git a/django/core/cache/backends/memcached.py b/django/core/cache/backends/memcached.py
    index e452498..c8ecdcb 100644
    a b class PyLibMCCache(BaseMemcachedCache):  
    169169        if client:
    170170            return client
    171171
    172         client = self._lib.Client(self._servers)
     172        if self._options and self._options.get("binary", False):
     173            client = self._lib.Client(self._servers, binary=True)
     174        else:
     175            client = self._lib.Client(self._servers)
     176
    173177        if self._options:
    174178            client.behaviors = self._options
    175179
Back to Top