Spaces:
Sleeping
Sleeping
Download api/routes/admin.py from Qurrah/replyflow-rag: direct link, hf CLI and curl.
- Browser
- Download file 441 Bytes
-
https://huggingface.co/spaces/Qurrah/replyflow-rag/resolve/main/api/routes/admin.py
- Command line
-
hf download hf://spaces/Qurrah/replyflow-rag/api/routes/admin.py
-
curl -L -o admin.py https://huggingface.co/spaces/Qurrah/replyflow-rag/resolve/main/api/routes/admin.py
441 Bytes
| 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"]) | |
| async def clear_cache(_: str = Security(verify_api_key)): | |
| clear_all_caches() | |
| logger.info("Cache manually cleared") | |
| return {"status": "ok", "message": "Cache cleared"} | |