aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-08-05 11:31:40 +0300
committerGravatar Vitaly Takmazov2019-08-05 11:31:40 +0300
commitd18c76dd2ec83a757ccb4073a49cc1512c9c5bcb (patch)
tree25e547ae466bc05405f8c2ce629322e36de0f489 /src/main/java/com/juick/service
parentc331058727be860a99055e2d4ac6ca7a4b3ec6b7 (diff)
Cache popular tags
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r--src/main/java/com/juick/service/TagService.java2
1 files changed, 2 insertions, 0 deletions
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<String> getUserBLTags(int uid);
+ @Cacheable(value = "popular_tags")
List<String> getPopularTags();
List<TagStats> getTagStats();