feat(cache): 优化缓存系统并重构数据库连接管理

- 将Redis连接方式改为连接池模式,提升连接复用效率
- 修复缓存注释错误,统一标识数据库缓存逻辑
- 添加数据检索结果非空验证,避免空指针异常
- 在数据库操作中添加读写锁保护,确保并发安全性
- 实现数据库查询和执行操作的重试机制,增强稳定性
- 更新配置文件中的缓存和数据库设置,优化缓存策略
- 重构README文档,补充框架特性和性能测试数据
- 添加示例路由配置,完善快速入门指南
This commit is contained in:
2026-01-22 04:36:52 +08:00
parent 7843f7e8d6
commit 40f6783036
16 changed files with 2991 additions and 511 deletions
File diff suppressed because it is too large Load Diff
+11 -3
View File
@@ -1,14 +1,22 @@
{
"cache": {
"db": {
"db": false,
"db": true,
"session": true,
"timeout": 7200
"timeout": 72000
},
"memory": {
"db": true,
"session": true,
"timeout": 7200
},
"redis": {
"db": true,
"host": "127.0.0.1",
"password": "",
"port": 6379,
"session": true,
"timeout": 7200
}
},
"codeConfig": [
@@ -24,7 +32,7 @@
"db": {
"mysql": {
"host": "192.168.6.253",
"name": "dgs-cms",
"name": "dgs-cms260122",
"password": "dasda8454456",
"port": "3306",
"user": "root"