콘텐츠 메인 API - @Transactional(readOnly = true) 추가

This commit is contained in:
2023-11-07 17:38:43 +09:00
parent 9a394b7dae
commit 1b7fc14f00
4 changed files with 9 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import kr.co.vividnext.sodalive.content.theme.QAudioContentTheme.audioContentThe
import org.springframework.beans.factory.annotation.Value
import org.springframework.cache.annotation.Cacheable
import org.springframework.stereotype.Repository
import org.springframework.transaction.annotation.Transactional
@Repository
class AudioContentThemeQueryRepository(
@@ -28,6 +29,7 @@ class AudioContentThemeQueryRepository(
.fetch()
}
@Transactional(readOnly = true)
@Cacheable(cacheNames = ["default"], key = "'activeThemeOfContent:' + ':' + #isAdult")
fun getActiveThemeOfContent(isAdult: Boolean = false): List<String> {
var where = audioContent.isActive.isTrue