Skip to content

Commit 720cf74

Browse files
committed
feat[chat]: redis 캐시 삭제 추가
1 parent d79fbd2 commit 720cf74

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

backend/src/main/java/com/ai/lawyer/domain/chatbot/service/HistoryService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public String deleteHistory(Long memberId, Long roomId) {
5252
History room = historyRepository.findByHistoryIdAndMemberId(roomId, member);
5353

5454
historyRepository.delete(room);
55+
chatCacheService.clearChatHistory(roomId);
56+
5557
return "채팅방이 삭제되었습니다.";
5658

5759
}

backend/src/main/java/com/ai/lawyer/infrastructure/redis/service/ChatCacheService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@RequiredArgsConstructor
1313
public class ChatCacheService {
1414

15-
private final RedisTemplate<String, ChatHistoryDto> chatRedisTemplate; // 새 템플릿 사용
15+
private final RedisTemplate<String, ChatHistoryDto> chatRedisTemplate;
1616
private static final String CHAT_HISTORY_KEY_PREFIX = "chat:history:";
1717

1818
// 채팅 메시지 캐싱 (24시간)

0 commit comments

Comments
 (0)