INNER CODE UNIT · Python
_fetch
KatrielMoses/voidaccess · voidaccess_cli/main.py:310
async def _fetch() -> dict:
cache = await get_enrichment_cache()
return await cache.stats()
return run_async(_fetch()) or {}
except Exception as exc:
logger_msg = exc # noqa: F841 — logged in caller if needed
return {"backend": "unavailable", "hits": 0, "misses": 0,
"hit_rate_pct": 0.0, "size": 0, "error": str(exc)[:120]}
def _show_cache_detail_table() -> None:
"""Print a per-source TTL table under the main status table."""
from utils.enrichment_cache import DEFAULT_TTL
ttl_table = Table(title="Enrichment cache TTL defaults", show_lines=False)
ttl_table.add_column("Source", style="bold")
ttl_table.add_column("TTL (seconds)", justify="right")