(self, key: str, ttl: int, value: str)
| 32 | return None |
| 33 | |
| 34 | def setex(self, key: str, ttl: int, value: str): |
| 35 | with self._lock: |
| 36 | expiry = time.time() + ttl |
| 37 | self._cache[key] = (value, expiry) |
| 38 | |
| 39 | def delete(self, key: str): |
| 40 | with self._lock: |