aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/service/CrosspostService.java4
-rw-r--r--src/main/java/com/juick/service/EmailService.java3
-rw-r--r--src/main/java/com/juick/service/PrivacyQueriesService.java3
-rw-r--r--src/main/java/com/juick/service/SubscriptionService.java2
4 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/CrosspostService.java b/src/main/java/com/juick/service/CrosspostService.java
index 28b9e8aba..a8e66a681 100644
--- a/src/main/java/com/juick/service/CrosspostService.java
+++ b/src/main/java/com/juick/service/CrosspostService.java
@@ -20,6 +20,7 @@ package com.juick.service;
import com.juick.ExternalToken;
import com.juick.model.ApplicationStatus;
import org.apache.commons.lang3.tuple.Pair;
+import org.springframework.cache.annotation.CacheEvict;
import javax.annotation.Nonnull;
import java.util.Optional;
@@ -72,15 +73,18 @@ public interface CrosspostService {
String getTelegramNameByHash(String hash);
+ @CacheEvict(value = "users_by_name", allEntries = true)
boolean setFacebookUser(String hash, int uid);
String getVKNameByHash(String hash);
boolean setVKUser(String hash, int uid);
+ @CacheEvict(value = "users_by_name", allEntries = true)
boolean setTelegramUser(String hash, int uid);
String getJIDByHash(String hash);
+ @CacheEvict(value = "users_by_name", allEntries = true)
boolean setJIDUser(String hash, int uid);
}
diff --git a/src/main/java/com/juick/service/EmailService.java b/src/main/java/com/juick/service/EmailService.java
index 0708cd967..26f26d59a 100644
--- a/src/main/java/com/juick/service/EmailService.java
+++ b/src/main/java/com/juick/service/EmailService.java
@@ -17,12 +17,15 @@
package com.juick.service;
+import org.springframework.cache.annotation.CacheEvict;
+
import java.util.List;
/**
* Created by vitalyster on 09.12.2016.
*/
public interface EmailService {
+ @CacheEvict(value = "users_by_name", allEntries = true)
boolean verifyAddressByCode(Integer userId, String code);
boolean addVerificationCode(Integer userId, String account, String code);
boolean addEmail(Integer userId, String email);
diff --git a/src/main/java/com/juick/service/PrivacyQueriesService.java b/src/main/java/com/juick/service/PrivacyQueriesService.java
index 17dd6a9b8..b208c4462 100644
--- a/src/main/java/com/juick/service/PrivacyQueriesService.java
+++ b/src/main/java/com/juick/service/PrivacyQueriesService.java
@@ -19,6 +19,7 @@ package com.juick.service;
import com.juick.Tag;
import com.juick.User;
+import org.springframework.cache.annotation.CacheEvict;
/**
* Created by aalexeev on 11/13/16.
@@ -28,7 +29,9 @@ public interface PrivacyQueriesService {
Removed, Added
}
+ @CacheEvict(value = { "discussions", "messages", "replies" }, allEntries = true)
PrivacyResult blacklistUser(User user, User target);
+ @CacheEvict(value = { "discussions", "messages", "replies" }, allEntries = true)
PrivacyResult blacklistTag(User user, Tag tag);
}
diff --git a/src/main/java/com/juick/service/SubscriptionService.java b/src/main/java/com/juick/service/SubscriptionService.java
index 8bc8d0719..b9bfcabd0 100644
--- a/src/main/java/com/juick/service/SubscriptionService.java
+++ b/src/main/java/com/juick/service/SubscriptionService.java
@@ -21,6 +21,7 @@ import com.juick.Message;
import com.juick.Tag;
import com.juick.User;
import com.juick.model.NotifyOpts;
+import org.springframework.cache.annotation.CacheEvict;
import java.util.List;
@@ -37,6 +38,7 @@ public interface SubscriptionService {
List<User> getUsersSubscribedToUserRecommendations(int uid, Message msg);
+ @CacheEvict(value = { "discussions" }, allEntries = true)
boolean subscribeMessage(Message message, User user);
boolean unSubscribeMessage(int mid, int vuid);