Skip to content

Commit 46636e4

Browse files
committed
fix: team apply evict game ccache
1 parent 02237a0 commit 46636e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/kotlin/gogo/gogostage/domain/team/root/application/TeamProcessor.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ import gogo.gogostage.domain.team.participant.persistence.TeamParticipantReposit
77
import gogo.gogostage.domain.team.root.application.dto.TeamApplyDto
88
import gogo.gogostage.domain.team.root.persistence.Team
99
import gogo.gogostage.domain.team.root.persistence.TeamRepository
10+
import gogo.gogostage.global.cache.CacheConstant
11+
import gogo.gogostage.global.cache.RedisCacheService
1012
import org.springframework.stereotype.Component
1113

1214
@Component
1315
class TeamProcessor(
1416
private val teamRepository: TeamRepository,
1517
private val teamParticipantRepository: TeamParticipantRepository,
16-
private val gameRepository: GameRepository
18+
private val gameRepository: GameRepository,
19+
private val redisCacheService: RedisCacheService
1720
) {
1821

1922
fun apply(game: Game, dto: TeamApplyDto) {
@@ -27,6 +30,8 @@ class TeamProcessor(
2730
TeamParticipant.of(team, it.studentId, it.positionX, it.positionY)
2831
}
2932
teamParticipantRepository.saveAll(participants)
33+
34+
redisCacheService.deleteFromCache("${CacheConstant.GAME_CACHE_VALE}::${game.stage.id}")
3035
}
3136

3237
}

0 commit comments

Comments
 (0)