인기 콘텐츠, 큐레이션 조회로직에 Cache 적용
This commit is contained in:
@@ -18,6 +18,7 @@ import kr.co.vividnext.sodalive.content.order.QOrder.order
|
||||
import kr.co.vividnext.sodalive.content.theme.QAudioContentTheme.audioContentTheme
|
||||
import kr.co.vividnext.sodalive.event.QEvent.event
|
||||
import kr.co.vividnext.sodalive.member.QMember.member
|
||||
import org.springframework.cache.annotation.Cacheable
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
import org.springframework.stereotype.Repository
|
||||
import java.time.LocalDateTime
|
||||
@@ -387,6 +388,11 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||
.fetch()
|
||||
}
|
||||
|
||||
@Cacheable(
|
||||
value = ["getAudioContentCurations"],
|
||||
key = "#isAdult",
|
||||
cacheManager = "cacheManager"
|
||||
)
|
||||
override fun getAudioContentCurations(isAdult: Boolean): List<AudioContentCuration> {
|
||||
var where = audioContentCuration.isActive.isTrue
|
||||
|
||||
@@ -438,6 +444,11 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
|
||||
.fetch()
|
||||
}
|
||||
|
||||
@Cacheable(
|
||||
value = ["weekLivedCache"],
|
||||
key = "#startDate" + '_' + "#isAdult" + '_' + "#offset" + '_' + "#limit",
|
||||
cacheManager = "cacheManager"
|
||||
)
|
||||
override fun getAudioContentRanking(
|
||||
cloudfrontHost: String,
|
||||
isAdult: Boolean,
|
||||
|
Reference in New Issue
Block a user