import logging from fastapi import APIRouter, Security from core.security import verify_api_key from services.cache_service import clear_all_caches logger = logging.getLogger(__name__) router = APIRouter(tags=["admin"]) @router.post("/admin/cache-clear") async def clear_cache(_: str = Security(verify_api_key)): clear_all_caches() logger.info("Cache manually cleared") return {"status": "ok", "message": "Cache cleared"}