refactor(coordinator-api,blockchain-explorer): add response caching and fix timestamp handling
- Add cached decorator to admin stats, job status, payment status, and marketplace stats endpoints - Configure cache TTLs using get_cache_config for different endpoint types (1min job_list, 30s user_balance, marketplace_stats) - Import cache_management router and include it in main app with /v1 prefix - Fix blockchain-explorer formatTimestamp to handle both ISO string and Unix numeric timestamps with type
This commit is contained in:
@@ -25,7 +25,8 @@ from .routers import (
|
||||
explorer,
|
||||
payments,
|
||||
web_vitals,
|
||||
edge_gpu
|
||||
edge_gpu,
|
||||
cache_management
|
||||
)
|
||||
from .routers.ml_zk_proofs import router as ml_zk_proofs
|
||||
from .routers.community import router as community_router
|
||||
@@ -221,6 +222,7 @@ def create_app() -> FastAPI:
|
||||
app.include_router(openclaw_enhanced, prefix="/v1")
|
||||
app.include_router(monitoring_dashboard, prefix="/v1")
|
||||
app.include_router(multi_modal_rl_router, prefix="/v1")
|
||||
app.include_router(cache_management, prefix="/v1")
|
||||
|
||||
# Add Prometheus metrics endpoint
|
||||
metrics_app = make_asgi_app()
|
||||
|
||||
Reference in New Issue
Block a user