fix(original): 인기 캐릭터 조회
- 캐시 키 변경
This commit is contained in:
		| @@ -45,10 +45,10 @@ class ChatCharacterService( | |||||||
|     @Transactional(readOnly = true) |     @Transactional(readOnly = true) | ||||||
|     @Cacheable( |     @Cacheable( | ||||||
|         cacheNames = ["popularCharacters_24h"], |         cacheNames = ["popularCharacters_24h"], | ||||||
|         key = "T(kr.co.vividnext.sodalive.chat.character.service.RankingWindowCalculator).now('popular-chat-character').cacheKey" |         key = "T(kr.co.vividnext.sodalive.chat.character.service.RankingWindowCalculator).now('popular-character').cacheKey" | ||||||
|     ) |     ) | ||||||
|     fun getPopularCharacters(limit: Long = 20): List<Character> { |     fun getPopularCharacters(limit: Long = 20): List<Character> { | ||||||
|         val window = RankingWindowCalculator.now("popular-chat-character") |         val window = RankingWindowCalculator.now("popular-character") | ||||||
|         val topIds = popularCharacterQuery.findPopularCharacterIds(window.windowStart, window.nextBoundary, limit) |         val topIds = popularCharacterQuery.findPopularCharacterIds(window.windowStart, window.nextBoundary, limit) | ||||||
|         val list = loadCharactersInOrder(topIds) |         val list = loadCharactersInOrder(topIds) | ||||||
|         return list.map { |         return list.map { | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ object RankingWindowCalculator { | |||||||
|     private const val BOUNDARY_HOUR = 20 // 20:00:00 UTC |     private const val BOUNDARY_HOUR = 20 // 20:00:00 UTC | ||||||
|  |  | ||||||
|     @JvmStatic |     @JvmStatic | ||||||
|     fun now(prefix: String = "popular-chat-character"): RankingWindow { |     fun now(prefix: String = "popular-character"): RankingWindow { | ||||||
|         val now = ZonedDateTime.now(ZONE) |         val now = ZonedDateTime.now(ZONE) | ||||||
|         val todayBoundary = now.toLocalDate().atTime(BOUNDARY_HOUR, 0, 0).atZone(ZONE) |         val todayBoundary = now.toLocalDate().atTime(BOUNDARY_HOUR, 0, 0).atZone(ZONE) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user