Coverage for src / lexigram / contracts / lifecycle / cache_aware.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-08-15 18:58 +0800

1from __future__ import annotations 

2 

3from typing import Any, Protocol, runtime_checkable 

4 

5 

6@runtime_checkable 

7class CacheAwareProtocol(Protocol): 

8 """Protocol for cache-aware operations.""" 

9 

10 async def invalidate_cache( 

11 self, 

12 keys: list[str] | None = None, 

13 patterns: list[str] | None = None, 

14 ) -> None: ... 

15 

16 async def get_cache_info(self) -> dict[str, Any]: ... 

17 

18 

19__all__ = ["CacheAwareProtocol"]