Ticket #9595: memcached.diff
File memcached.diff, 679 bytes (added by , 16 years ago) |
---|
-
memcached.py
31 31 else: 32 32 return val 33 33 34 def set(self, key, value, timeout= 0):34 def set(self, key, value, timeout=None): 35 35 if isinstance(value, unicode): 36 36 value = value.encode('utf-8') 37 self._cache.set(smart_str(key), value, timeout or self.default_timeout) 37 if timeout is None: 38 timeout = self.default_timeout 39 self._cache.set(smart_str(key), value, timeout) 38 40 39 41 def delete(self, key): 40 42 self._cache.delete(smart_str(key))