Get cached client and refresh its last-used timestamp. Must be called while holding ``_client_cache_lock``.
(cache_key: str)
| 49 | |
| 50 | |
| 51 | def _get_cached_client(cache_key: str) -> Optional[Any]: |
| 52 | """Get cached client and refresh its last-used timestamp. |
| 53 | |
| 54 | Must be called while holding ``_client_cache_lock``. |
| 55 | """ |
| 56 | entry = _client_cache.get(cache_key) |
| 57 | if entry is None: |
| 58 | return None |
| 59 | |
| 60 | client, _ = entry |
| 61 | _client_cache[cache_key] = (client, time.monotonic()) |
| 62 | return client |
| 63 | |
| 64 | |
| 65 | def _store_client(cache_key: str, client: Any) -> None: |
no test coverage detected
searching dependent graphs…