Get a value from the cache. Args: namespace: Cache namespace (e.g., node name) key: Cache key Returns: Cached value if found and not expired, None otherwise
(self, namespace: Tuple[str, ...], key: str)
| 85 | |
| 86 | @abstractmethod |
| 87 | def get(self, namespace: Tuple[str, ...], key: str) -> Optional[Any]: |
| 88 | """Get a value from the cache. |
| 89 | |
| 90 | Args: |
| 91 | namespace: Cache namespace (e.g., node name) |
| 92 | key: Cache key |
| 93 | |
| 94 | Returns: |
| 95 | Cached value if found and not expired, None otherwise |
| 96 | """ |
| 97 | raise NotImplementedError() |
| 98 | |
| 99 | @abstractmethod |
| 100 | def put(self, namespace: Tuple[str, ...], key: str, value: Any, ttl: Optional[int] = None) -> None: |
no outgoing calls