@@ -9,8 +9,6 @@ import gogo.gogostage.domain.community.comment.persistence.CommentRepository
99import gogo.gogostage.domain.community.commentlike.persistence.CommentLike
1010import gogo.gogostage.domain.community.commentlike.persistence.CommentLikeRepository
1111import gogo.gogostage.domain.community.root.application.dto.*
12- import gogo.gogostage.global.cache.CacheConstant
13- import gogo.gogostage.global.cache.RedisCacheService
1412import gogo.gogostage.global.error.StageException
1513import gogo.gogostage.global.internal.student.stub.StudentByIdStub
1614import org.springframework.data.repository.findByIdOrNull
@@ -26,7 +24,6 @@ class CommunityProcessor(
2624 private val commentLikeRepository : CommentLikeRepository ,
2725 private val commentMapper : CommunityMapper ,
2826 private val boardRepository : BoardRepository ,
29- private val redisCacheService : RedisCacheService
3027) {
3128
3229 fun likeBoard (studentId : Long , board : Board ): LikeResDto {
@@ -41,9 +38,6 @@ class CommunityProcessor(
4138 board.minusLikeCount()
4239 boardRepository.save(board)
4340
44- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${board.id} :true" )
45- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${board.id} :false" )
46-
4741 return LikeResDto (
4842 isLiked = false
4943 )
@@ -58,9 +52,6 @@ class CommunityProcessor(
5852 board.plusLikeCount()
5953 boardRepository.save(board)
6054
61- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${board.id} :true" )
62- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${board.id} :false" )
63-
6455 return LikeResDto (
6556 isLiked = true
6657 )
@@ -86,9 +77,6 @@ class CommunityProcessor(
8677 board.plusCommentCount()
8778 boardRepository.save(board)
8879
89- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${comment.board.id} :true" )
90- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${comment.board.id} :false" )
91-
9280 return commentMapper.mapWriteBoardCommentResDto(comment, writeBoardCommentDto, student)
9381 }
9482
@@ -100,10 +88,6 @@ class CommunityProcessor(
10088 ? : throw StageException (" CommentLike Not Found, commentId=${comment.id} , studentId=${student.studentId} " , HttpStatus .NOT_FOUND .value())
10189
10290 commentLikeRepository.delete(commentLike)
103-
104- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${comment.board.id} :true" )
105- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${comment.board.id} :false" )
106-
10791 comment.minusLikeCount()
10892 commentRepository.save(comment)
10993
@@ -118,9 +102,6 @@ class CommunityProcessor(
118102
119103 commentLikeRepository.save(boardLike)
120104
121- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${comment.board.id} :true" )
122- redisCacheService.deleteFromCache(" ${CacheConstant .COMMUNITY_INFO_CACHE_VALUE } ::${comment.board.id} :false" )
123-
124105 comment.plusLikeCount()
125106 commentRepository.save(comment)
126107
0 commit comments