"""Shared protocols for Audience components.""" from typing import Any, Optional, 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: Optional[int] = None ) -> Optional[bool]: ... @runtime_checkable class AsyncCache(Protocol): """Async cache protocol compatible with aiocache.""" async def get(self, key: str) -> Any: ... async def set( self, key: str, value: Any, ttl: Any = None, **kwargs: Any ) -> Optional[bool]: ... class SecretsManager(Protocol): def get_secret(self, secret_name: str) -> str: ...