From d18c76dd2ec83a757ccb4073a49cc1512c9c5bcb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 5 Aug 2019 11:31:40 +0300 Subject: Cache popular tags --- src/main/java/com/juick/service/TagService.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/com/juick/service') diff --git a/src/main/java/com/juick/service/TagService.java b/src/main/java/com/juick/service/TagService.java index 489f405a..ca4b665e 100644 --- a/src/main/java/com/juick/service/TagService.java +++ b/src/main/java/com/juick/service/TagService.java @@ -21,6 +21,7 @@ import com.juick.Tag; import com.juick.User; import com.juick.model.TagStats; import org.apache.commons.lang3.tuple.Pair; +import org.springframework.cache.annotation.Cacheable; import java.util.Collection; import java.util.List; @@ -44,6 +45,7 @@ public interface TagService { List getUserBLTags(int uid); + @Cacheable(value = "popular_tags") List getPopularTags(); List getTagStats(); -- cgit v1.2.3