Skip to content

Commit

Permalink
feat: session cache 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Curry4182 committed Apr 15, 2024
1 parent 679b403 commit 2e33ea9
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.programmers.lime.redis.chat;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

Expand All @@ -26,9 +25,8 @@ public void saveSession(final String sessionId, final ChatSessionInfo chatSessio
);
}

@Cacheable(value = "sessionCache", key = "#sessionId", condition = "#sessionId != null")
public ChatSessionInfo getSessionInfo(final String sessionId) {
return (ChatSessionInfo) redisTemplate.opsForValue().get(SESSION_PREFIX + sessionId);
return (ChatSessionInfo)redisTemplate.opsForValue().get(SESSION_PREFIX + sessionId);
}

public Set<String> getSessionIdsByMemberAndRoom(final Long memberId, final Long roomId) {
Expand Down

0 comments on commit 2e33ea9

Please sign in to comment.