From 13b81d40fde2939500924403dd767bdc9887ff14 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 9 Dec 2022 14:12:33 +0300 Subject: Fix cache keys --- src/main/java/com/juick/service/MessagesService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/juick') diff --git a/src/main/java/com/juick/service/MessagesService.java b/src/main/java/com/juick/service/MessagesService.java index 1afeb216..0a881924 100644 --- a/src/main/java/com/juick/service/MessagesService.java +++ b/src/main/java/com/juick/service/MessagesService.java @@ -80,7 +80,7 @@ public interface MessagesService { List> getMessagesRecommendations(Collection mids); - @Cacheable(value = "discover", key="#visitorUid + #before") + @Cacheable(value = "discover", key="{ #visitorUid, #before }") List getAll(int visitorUid, int before); List getTag(int tid, int visitorUid, int before, int cnt); @@ -93,7 +93,7 @@ public interface MessagesService { List getPrivate(int uid, int before); - @Cacheable(value = "discussions", key="#uid + #to") + @Cacheable(value = "discussions", key="{ #uid, #to }") List getDiscussions(int uid, Long to); /** @@ -122,13 +122,13 @@ public interface MessagesService { List getUserSearch(User visitor, int UID, String search, int privacy, int page); - @Cacheable(value = "messages", key="#visitor.uid + #mids.hashCode()") + @Cacheable(value = "messages", key="{ #visitor.uid, #mids.hashCode() }") List getMessages(User visitor, List mids); @CacheEvict(value = { "discover", "discussions", "messages", "replies" }, allEntries = true) Map> updateReactionsFor(final List mid); - @Cacheable(value = "replies", key="#user.uid + #mid") + @Cacheable(value = "replies", key="{ #user.uid, #mid }") List getReplies(User user, int mid); boolean setMessagePrivacy(int mid); -- cgit v1.2.3