Files
mario_scraper/check_cache_size.py

17 lines
515 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import json
CACHE_FILE = "product_translation_cache.json"
def check_cache_size():
try:
with open(CACHE_FILE, "r", encoding="utf-8") as f:
cache = json.load(f)
print(f"🔎 В кеші збережено {len(cache)} перекладів.")
except FileNotFoundError:
print("❌ Кеш-файл не знайдено.")
except Exception as e:
print(f"⚠️ Помилка читання кешу: {e}")
if __name__ == "__main__":
check_cache_size()