add translation cache and queue
This commit is contained in:
16
check_cache_size.py
Normal file
16
check_cache_size.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user