diff --git a/api/src/main/kotlin/com/oksusu/susu/api/statistic/application/StatisticFacade.kt b/api/src/main/kotlin/com/oksusu/susu/api/statistic/application/StatisticFacade.kt index a5a54e71..a248ad04 100644 --- a/api/src/main/kotlin/com/oksusu/susu/api/statistic/application/StatisticFacade.kt +++ b/api/src/main/kotlin/com/oksusu/susu/api/statistic/application/StatisticFacade.kt @@ -25,16 +25,11 @@ class StatisticFacade( private val logger = KotlinLogging.logger { } suspend fun getUserEnvelopeStatistic(user: AuthUser): UserEnvelopeStatisticResponse { - /** 통계 캐싱 여부 확인 */ - userEnvelopeStatisticService.getStatisticOrNull(user.uid)?.run { - logger.debug { "${user.uid} user statistic cache hit" } - - return UserEnvelopeStatisticResponse.from(this) + return userEnvelopeStatisticService.getStatisticOrNull(user.uid)?.let { + UserEnvelopeStatisticResponse.from(it) + } ?: createUserEnvelopeStatistic(user.uid).let { + UserEnvelopeStatisticResponse.from(it) } - - val userEnvelopeStatistic = createUserEnvelopeStatistic(user.uid) - - return UserEnvelopeStatisticResponse.from(userEnvelopeStatistic) } suspend fun refreshUserEnvelopeStatistic(user: AuthUser): UserEnvelopeStatisticResponse { diff --git a/gradle.properties b/gradle.properties index 664eebf2..54d027e6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version=1.1.22 +version=1.1.23 kotlin.code.style=official