feat(comment): 引入本地缓存优化评论查询性能

- 添加 Caffeine 依赖以支持本地缓存
- 实现评论详情的本地缓存机制,减少 Redis 查询压力
-优化分页查询逻辑,优先从本地缓存获取评论数据
- 异步同步评论详情至本地缓存,提升响应速度
- 简化 Redis 操作代码,提高可读性和维护性
This commit is contained in:
2025-11-08 15:34:27 +08:00
parent 6fbe8eed25
commit 85e6bab079
2 changed files with 143 additions and 65 deletions

View File

@@ -130,6 +130,12 @@
<artifactId>han-note-user-api</artifactId>
</dependency>
<!-- Caffeine 本地缓存 -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
</dependency>
</dependencies>