MCPcopy Create free account
hub / github.com/THESIS-AGENT/AIRouter / refresh_cache

Function refresh_cache

api_key_manager/api.py:420–428  ·  view source on GitHub ↗

手动刷新失败密钥缓存

()

Source from the content-addressed store, hash-verified

418
419@app.post("/refresh_cache")
420async def refresh_cache():
421 """手动刷新失败密钥缓存"""
422 logger.info("收到手动刷新缓存请求")
423 try:
424 update_failed_keys_cache()
425 return {"message": "缓存刷新成功", "timestamp": datetime.now().isoformat()}
426 except Exception as e:
427 logger.error(f"手动刷新缓存失败: {str(e)}")
428 raise HTTPException(status_code=500, detail=f"刷新缓存失败: {str(e)}")
429
430if __name__ == "__main__":
431 import uvicorn

Callers

nothing calls this directly

Calls 1

update_failed_keys_cacheFunction · 0.85

Tested by

no test coverage detected