Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public Map<Object, Object> getRoomData(String roomId) {
}

private String getRoomKey(String roomId) {
return "room:" + roomId;
return "room:data:" + roomId;
}

public void updateAllFields(String roomId, Map<String, String> updates) {
Expand All @@ -44,7 +44,7 @@ public void deleteRoom(String roomId) {
* @return room 키들(예: "room:1234")을 순회할 수 있는 Cursor 객체
*/
public Cursor<String> scanRoomKeys() {
ScanOptions options = ScanOptions.scanOptions().match("room:*").count(1000).build();
ScanOptions options = ScanOptions.scanOptions().match("room:data:*").count(1000).build();
return redisTemplate.scan(options);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public List<RoomSummaryRes> getAllRoomSummaries(RoomListReq roomListReq) {
try (Cursor<String> roomKeys = roomRepository.scanRoomKeys()) {
while (roomKeys.hasNext()) {
String roomKey = roomKeys.next();
String roomId = roomKey.replaceFirst("room:", "");
String roomId = roomKey.replaceFirst("room:data:", "");

Map<Object, Object> roomData = roomRepository.getRoomData(roomId);
if (roomData == null || roomData.isEmpty()) {
Expand Down Expand Up @@ -228,4 +228,4 @@ public RoomDetailRes getRoomDetails(String roomId, String userUuid) {

return new RoomDetailRes(RoomInfoRes.from(metadata), userList);
}
}
}
Loading