Skip to content

Commit

Permalink
add :: condition 속성 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Umjiseung committed Sep 17, 2024
1 parent df5a677 commit 2fa0c71
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class GetAcceptedUsersService(
private val userRepository: UserRepository,
) {

@Cacheable(value = ["AcceptedUser"], cacheManager = "redisCacheManager")
@Cacheable(value = ["AcceptedUser"], condition = "#request.grade = 0 && #request.classNum = 0 && #request.keyword.equals('') && #request.role.equals('ROLE_STUDENT')", cacheManager = "redisCacheManager")
fun execute(request: AcceptedUserRequest): List<SingleAcceptedUserResDto> =
when (request.role) {
UserRoleType.ROLE_STUDENT -> userRepository.search(request.grade, request.classNum, request.keyword)
Expand Down

0 comments on commit 2fa0c71

Please sign in to comment.