Write-through cache support

This commit is contained in:
HugeFrog24
2026-03-01 13:44:31 +01:00
parent 27f7beb8b7
commit de10d66650
2 changed files with 32 additions and 9 deletions

View File

@@ -59,7 +59,7 @@ def _is_stale(vid: dict[str, Any], now: int) -> bool:
"""True if the cached size is absent or older than SIZE_CACHE_TTL seconds."""
if vid.get("size") is None:
return True
return (now - vid.get("size_checked_at", 0)) >= SIZE_CACHE_TTL
return (now - int(vid.get("size_checked_at", 0))) >= SIZE_CACHE_TTL
# --------------- CLI ---------------