aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-09 14:12:33 +0300
committerGravatar Vitaly Takmazov2022-12-09 14:12:33 +0300
commit13b81d40fde2939500924403dd767bdc9887ff14 (patch)
tree74d326f21355c53c803fe34a57326c959f602c37 /src/main/java
parentcef2623a14f2de68775bc70158b8616eeaaeea6e (diff)
Fix cache keys
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/service/MessagesService.java8
1 files changed, 4 insertions, 4 deletions
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<Pair<Integer, User>> getMessagesRecommendations(Collection<Integer> mids);
- @Cacheable(value = "discover", key="#visitorUid + #before")
+ @Cacheable(value = "discover", key="{ #visitorUid, #before }")
List<Integer> getAll(int visitorUid, int before);
List<Integer> getTag(int tid, int visitorUid, int before, int cnt);
@@ -93,7 +93,7 @@ public interface MessagesService {
List<Integer> getPrivate(int uid, int before);
- @Cacheable(value = "discussions", key="#uid + #to")
+ @Cacheable(value = "discussions", key="{ #uid, #to }")
List<Integer> getDiscussions(int uid, Long to);
/**
@@ -122,13 +122,13 @@ public interface MessagesService {
List<Integer> 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<Message> getMessages(User visitor, List<Integer> mids);
@CacheEvict(value = { "discover", "discussions", "messages", "replies" }, allEntries = true)
Map<Integer,Set<Reaction>> updateReactionsFor(final List<Integer> mid);
- @Cacheable(value = "replies", key="#user.uid + #mid")
+ @Cacheable(value = "replies", key="{ #user.uid, #mid }")
List<Message> getReplies(User user, int mid);
boolean setMessagePrivacy(int mid);