콘텐츠 메인 캐싱 전략 변경 - repository 에 있던 @Cacheable 을 service 코드로 이동
This commit is contained in:
@@ -4,6 +4,7 @@ import com.querydsl.jpa.impl.JPAQueryFactory
|
||||
import kr.co.vividnext.sodalive.content.QAudioContent.audioContent
|
||||
import kr.co.vividnext.sodalive.content.theme.QAudioContentTheme.audioContentTheme
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.cache.annotation.Cacheable
|
||||
import org.springframework.stereotype.Repository
|
||||
|
||||
@Repository
|
||||
@@ -27,6 +28,7 @@ class AudioContentThemeQueryRepository(
|
||||
.fetch()
|
||||
}
|
||||
|
||||
@Cacheable(cacheNames = ["default"], key = "'getActiveThemeOfContent:' + ':' + #isAdult")
|
||||
fun getActiveThemeOfContent(isAdult: Boolean = false): List<String> {
|
||||
var where = audioContent.isActive.isTrue
|
||||
.and(audioContentTheme.isActive.isTrue)
|
||||
|
Reference in New Issue
Block a user