perf(gateway): 为 dashboard 接口添加短时响应缓存

新增 DashboardResponseCache,对 stats/daily_stats/provider_status
三个接口按用户维度缓存 15-30 秒,减少重复数据库查询。
This commit is contained in:
fawney19
2026-04-15 03:03:20 +08:00
parent 98ad1172b0
commit 67a2ca6e31
6 changed files with 118 additions and 8 deletions
+2
View File
@@ -1,10 +1,12 @@
mod auth_api_key_last_used;
mod auth_context;
mod dashboard_response;
mod direct_plan_bypass;
mod scheduler_affinity;
pub(crate) use auth_api_key_last_used::AuthApiKeyLastUsedCache;
pub(crate) use auth_context::AuthContextCache;
pub(crate) use dashboard_response::DashboardResponseCache;
pub(crate) use direct_plan_bypass::DirectPlanBypassCache;
pub(crate) use scheduler_affinity::{
SchedulerAffinityCache, SchedulerAffinitySnapshotEntry, SchedulerAffinityTarget,