Commit 9296eb65 authored by 刘基明's avatar 刘基明

降低缓存刷新频率

parent 5609bb9d
...@@ -30,7 +30,7 @@ public class ConJobManager { ...@@ -30,7 +30,7 @@ public class ConJobManager {
/** /**
* 定时统计 话题 访问数据,并刷到redis * 定时统计 话题 访问数据,并刷到redis
*/ */
@Scheduled(cron = "*/10 * * * * ?") // @Scheduled(cron = "*/10 * * * * ?")
public void topicVisitorStats() { public void topicVisitorStats() {
String topicId = "123"; String topicId = "123";
Integer detailVisitTimes = visitLogService.queryTopicDetailVisit(topicId); Integer detailVisitTimes = visitLogService.queryTopicDetailVisit(topicId);
...@@ -40,16 +40,16 @@ public class ConJobManager { ...@@ -40,16 +40,16 @@ public class ConJobManager {
/** /**
* 定时统计主题、话题排行 * 定时统计主题、话题排行
*/ */
@Scheduled(cron = "*/30 * * * * ?") @Scheduled(cron = "10 */2 * * * ?")
public void themeRank() { public void themeRank() {
rankService.rankThemes(); rankService.rankThemes();
rankService.rankTopics(); rankService.rankTopics();
} }
/** /**
* 定时统计主题、话题排行 * 定时刷新最新帖子
*/ */
@Scheduled(cron = "*/5 * * * * ?") @Scheduled(cron = "*/10 * * * * ?")
public void getThemeNewest() { public void getThemeNewest() {
recommendService.refreshNewestThemes(); recommendService.refreshNewestThemes();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment