캐시 적용 - 추천라이브, 이벤트 리스트, 2주 이내 콘텐츠 업로드 한 크리에이터, 콘텐츠 상단 배너,

This commit is contained in:
2023-10-17 17:58:24 +09:00
parent 1fcb0ec5fd
commit e5c85287bb
4 changed files with 20 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import kr.co.vividnext.sodalive.aws.s3.S3Uploader
import kr.co.vividnext.sodalive.common.SodaException
import kr.co.vividnext.sodalive.utils.generateFileName
import org.springframework.beans.factory.annotation.Value
import org.springframework.cache.annotation.Cacheable
import org.springframework.data.repository.findByIdOrNull
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
@@ -20,6 +21,10 @@ class EventService(
@Value("\${cloud.aws.cloud-front.host}")
private val cloudFrontHost: String
) {
@Cacheable(
value = ["getEventList"],
cacheManager = "cacheManager"
)
fun getEventList(): GetEventResponse {
val eventList = repository.getEventList()
.asSequence()