feat: Implement configuration caching mechanism and force-refresh feature**

 **New Features**:

* Added API and frontend support for forcibly refreshing Clash configuration cache
* Implemented a configuration cache TTL mechanism (60 seconds) to reduce redundant requests
* Introduced `ProxyRequestCache` system to manage backend data caching
* Automatically refresh frontend state after core operations to enhance user experience

🚀 **Performance Optimizations**:

* Increased Clash configuration refresh interval from 5 seconds to 60 seconds
* Force refresh cache after configuration updates to resolve data inconsistency
* Automatically trigger state refresh after core switch, start, stop, and restart actions

🔧 **Technical Improvements**:

* Removed unused dependencies: `ab_glyph`, `owned_ttf_parser`, `ttf-parser`
* Simplified WebSocket dependency management, unified `tungstenite` version
* Refactored configuration save validation process, improved merge file handling
* Improved error handling and overall user experience
This commit is contained in:
Tunglies
2025-07-24 01:56:18 +08:00
parent 27535c7bb7
commit 3048a2ae08
10 changed files with 83 additions and 99 deletions

View File

@@ -5,6 +5,7 @@
- **核心架构升级**:与内核 Mihomo 采用 IPC 通信,不再依赖 Restful API 通信,提升性能和稳定性
- **流量监控系统重构**:前端实现全新的增强流量监控系统,支持数据压缩、采样和智能缓存
- **数据验证机制**:引入类型安全的数据验证器,确保 API 响应数据的一致性和可靠性
- **配置缓存架构**:实现智能配置缓存系统,支持后端数据缓存和强制刷新机制
### ✨ 新增功能
@@ -14,6 +15,8 @@
- 引用计数管理器智能收集数据
- 新增流量监控诊断工具与错误边界组件
- 多版本画布流量图表,丰富可视化选项
- 新增强制刷新 Clash 配置/节点缓存功能,提升更新响应速度
- 增加代理请求缓存机制,减少重复 API 调用
### 🚀 性能优化
@@ -22,6 +25,8 @@
- 引用计数机制避免不必要的数据收集,提升整体性能
- 优化流量图表渲染性能,支持大数据量展示
- 改进前端数据获取和缓存策略
- 实现配置/节点缓存 TTL 机制,减少不必要的配置/节点请求
- 改进 Clash 配置/节点刷新间隔从5秒优化到60秒减少系统资源消耗
### 🐞 修复问题
@@ -30,6 +35,8 @@
- 增强代理更新的错误处理机制
- 修复 JSON 解析错误处理
- 优化调试日志输出,减少噪音
- 修复配置修改后前端缓存不同步问题
- 改进核心启动/停止/重启后的状态刷新机制
### 🔧 技术改进