From 8b3ce5d5407a8dc9a943aea4ebd357f62b404f93 Mon Sep 17 00:00:00 2001 From: KimGyeongsuuu Date: Wed, 10 Jul 2024 13:35:58 +0900 Subject: [PATCH] =?UTF-8?q?add=20::=20=ED=95=99=EC=83=9D=ED=9A=8C=EA=B0=80?= =?UTF-8?q?=20=EC=82=AC=EC=9A=A9=EC=9E=90=20=EA=B6=8C=ED=95=9C=EC=9D=84=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=ED=95=A0=EB=95=8C=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=95=84=20=EC=BA=90=EC=8B=9C=20=EC=82=AD=EC=A0=9C=ED=95=98?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/studentCouncil/usecase/GrantAuthorityUseCase.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/goms-application/src/main/kotlin/com/goms/v2/domain/studentCouncil/usecase/GrantAuthorityUseCase.kt b/goms-application/src/main/kotlin/com/goms/v2/domain/studentCouncil/usecase/GrantAuthorityUseCase.kt index 673a36a1..a3a77972 100644 --- a/goms-application/src/main/kotlin/com/goms/v2/domain/studentCouncil/usecase/GrantAuthorityUseCase.kt +++ b/goms-application/src/main/kotlin/com/goms/v2/domain/studentCouncil/usecase/GrantAuthorityUseCase.kt @@ -5,12 +5,18 @@ import com.goms.v2.domain.account.updateAuthority import com.goms.v2.domain.auth.exception.AccountNotFoundException import com.goms.v2.domain.studentCouncil.data.dto.GrantAuthorityDto import com.goms.v2.repository.account.AccountRepository +import org.springframework.cache.annotation.CacheEvict @UseCaseWithTransaction class GrantAuthorityUseCase( private val accountRepository: AccountRepository ) { + @CacheEvict( + value = ["userProfiles"], + key = "#dto.accountIdx", + cacheManager = "contentCacheManager" + ) fun execute(dto: GrantAuthorityDto) { val account = accountRepository.findByIdOrNull(dto.accountIdx) ?: throw AccountNotFoundException()