"""Shared protocols for Audience components.""" from typing import Any, Protocol, runtime_checkable @runtime_checkable class Cache(Protocol): """Async cache protocol compatible with cachelib.""" def get(self, key: str) -> Any: ... def set( self, key: str, value: Any, *, timeout: int | None = None ) -> bool | None: ... @runtime_checkable class AsyncCache(Protocol): """Async cache protocol compatible with aiocache.""" async def get(self, key: str) -> Any: ... async def set( self, key: Any, value: Any, ttl: object = object(), dumps_fn: Any | None = None, namespace: Any | None = None, _cas_token: Any | None = None, _conn: Any | None = None, ) -> bool | None: ... class SecretsManager(Protocol): def get_secret(self, secret_name: str) -> str: ...