Spaces:
Running
Running
Download bioai-platform/backend/app/routers/cache_stats.py from Samad14/bio-nexus-api: direct link, hf CLI and curl.
- Browser
- Download file 413 Bytes
-
https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/bioai-platform/backend/app/routers/cache_stats.py
- Command line
-
hf download hf://spaces/Samad14/bio-nexus-api/bioai-platform/backend/app/routers/cache_stats.py
-
curl -L -o cache_stats.py https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/bioai-platform/backend/app/routers/cache_stats.py
413 Bytes
| import logging | |
| from fastapi import APIRouter, Request | |
| from app.services.cache import get_cache_stats, reset_cache_stats | |
| logger = logging.getLogger(__name__) | |
| router = APIRouter(prefix="/api/admin", tags=["admin"]) | |
| async def cache_stats(): | |
| return get_cache_stats() | |
| async def reset_stats(): | |
| reset_cache_stats() | |
| return {"status": "ok"} | |