Ticket #11012: memcached_revert_unicode.diff
File memcached_revert_unicode.diff, 769 bytes (added by , 16 years ago) |
---|
-
django/core/cache/backends/memcached.py
25 25 val = self._cache.get(smart_str(key)) 26 26 if val is None: 27 27 return default 28 else: 29 if isinstance(val, basestring): 30 return smart_unicode(val) 31 else: 32 return val 28 return val 33 29 34 30 def set(self, key, value, timeout=0): 35 if isinstance(value, unicode):36 value = value.encode('utf-8')37 31 self._cache.set(smart_str(key), value, timeout or self.default_timeout) 38 32 39 33 def delete(self, key):