from typing import Annotated from anydi.ext.fastapi import Inject from cachelib import BaseCache as Cache from fastapi import APIRouter from starlette import status router = APIRouter(prefix="/devtools", tags=["DevTools"]) @router.post( "/cache/clear", operation_id="clearCache", status_code=status.HTTP_204_NO_CONTENT, ) def clear_cache(cache: Annotated[Cache, Inject()]) -> None: cache.clear()