"""Cache routes — inspection + invalidation.""" from __future__ import annotations from fastapi import APIRouter, Depends from api.deps import get_cache_service from services.cache_service import CacheService router = APIRouter() @router.get("") @router.get("/") async def cache_stats(svc: CacheService = Depends(get_cache_service)): return svc.stats() @router.delete("") @router.delete("/") async def cache_clear(svc: CacheService = Depends(get_cache_service)): n = svc.clear() return {"cleared": n}