feat(cache): 优化设备模板缓存策略并添加分布式缓存清理功能
- 引入Caffeine本地缓存替代Redis缓存提高性能 - 添加Redis Pub/Sub机制实现多节点缓存同步清理 - 在CsDeviceServiceImpl中注释掉原有的Redis缓存清理逻辑 - 在CsDevModelServiceImpl中添加缓存清理消息发送功能 - 新增ModelCacheClearListener监听器处理缓存清理通知 - 实现IStatService接口的clearModelCache方法 - 添加getModelData方法实现本地缓存优先的数据获取策略 - 配置最大50000条缓存数据,60分钟过期时间
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
<groupId>com.github.tocrhz</groupId>
|
||||
<artifactId>mqtt-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- caffeine 本地缓存 -->
|
||||
<dependency>
|
||||
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||
<artifactId>caffeine</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-web</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user