Get cache statistics. Returns: Dictionary with cache size and other metrics
(self)
| 223 | self._save_cache() |
| 224 | |
| 225 | def get_cache_stats(self) -> dict[str, int]: |
| 226 | """ |
| 227 | Get cache statistics. |
| 228 | |
| 229 | Returns: |
| 230 | Dictionary with cache size and other metrics |
| 231 | """ |
| 232 | return { |
| 233 | "total_entries": len(self.cache), |
| 234 | "cache_file_exists": self.cache_file.exists(), |
| 235 | "cache_file_size_bytes": ( |
| 236 | self.cache_file.stat().st_size if self.cache_file.exists() else 0 |
| 237 | ), |
| 238 | } |
| 239 | |
| 240 | def get_cached_files(self) -> list[Path]: |
| 241 | """ |
no outgoing calls