Spaces:
Running
Running
File size: 413 Bytes
fb8c550 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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"])
@router.get("/cache-stats")
async def cache_stats():
return get_cache_stats()
@router.post("/cache-stats/reset")
async def reset_stats():
reset_cache_stats()
return {"status": "ok"}
|