From e3595acca39a3f22a29ac0a2bf9e6c5e8858d578 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 9 Dec 2022 03:34:30 +0300 Subject: Update cache evict rules --- src/main/java/com/juick/service/MessagesService.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main') diff --git a/src/main/java/com/juick/service/MessagesService.java b/src/main/java/com/juick/service/MessagesService.java index 3fdd2b9e..626cc495 100644 --- a/src/main/java/com/juick/service/MessagesService.java +++ b/src/main/java/com/juick/service/MessagesService.java @@ -126,8 +126,10 @@ public interface MessagesService { boolean setMessagePrivacy(int mid); + @CacheEvict(value = { "discussions", "messages", "replies" }, allEntries = true) boolean deleteMessage(int uid, int mid); + @CacheEvict(value = { "discussions", "messages", "replies" }, allEntries = true) boolean deleteReply(int uid, int mid, int rid); List getLastMessages(int hours); @@ -142,12 +144,15 @@ public interface MessagesService { List getUnread(User user); + @CacheEvict(value = { "discussions", "messages", "replies" }, allEntries = true) boolean updateMessage(Integer mid, Integer rid, String body); + @CacheEvict(value = { "discussions", "messages", "replies" }, allEntries = true) boolean updateReplyUri(Message reply, URI replyUri); boolean replyExists(URI replyUri); + @CacheEvict(value = { "discussions", "messages", "replies" }, allEntries = true) boolean deleteReply(URI userUri, URI replyUri); String getMessageProperty(Integer mid, Integer rid, String key); -- cgit v1.2.3