(self, key)
| 33 | return timeout |
| 34 | |
| 35 | def get(self, key): |
| 36 | try: |
| 37 | expires, value = self._cache[key] |
| 38 | if expires == 0 or expires > time.time(): |
| 39 | return pickle.loads(value) |
| 40 | except (KeyError, pickle.PickleError): |
| 41 | return None |
| 42 | |
| 43 | def set(self, key, value, timeout=None): |
| 44 | expires = self._normalize_timeout(timeout) |
no outgoing calls