diff options
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r-- | src/main/java/com/juick/service/MessagesService.java | 5 | ||||
-rw-r--r-- | src/main/java/com/juick/service/UserService.java | 5 |
2 files changed, 1 insertions, 9 deletions
diff --git a/src/main/java/com/juick/service/MessagesService.java b/src/main/java/com/juick/service/MessagesService.java index 490e0cfca..e98b2b1de 100644 --- a/src/main/java/com/juick/service/MessagesService.java +++ b/src/main/java/com/juick/service/MessagesService.java @@ -22,8 +22,6 @@ import com.juick.Reaction; import com.juick.User; import com.juick.model.ResponseReply; import org.apache.commons.lang3.tuple.Pair; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; import java.net.URI; import java.util.*; @@ -32,10 +30,8 @@ import java.util.*; * Created by aalexeev on 11/13/16. */ public interface MessagesService { - @CacheEvict(value = "discussions", allEntries = true) int createMessage(int uid, String txt, String attachment, List<com.juick.Tag> tags); - @CacheEvict(value = "discussions", allEntries = true) int createReply(int mid, int rid, User user, String txt, String attachment); int getReplyIDIncrement(int mid); @@ -87,7 +83,6 @@ public interface MessagesService { List<Integer> getPrivate(int uid, int before); - @Cacheable(value = "discussions", key="#uid") List<Integer> getDiscussions(int uid, Long to); List<Integer> getRecommended(int uid, int before); diff --git a/src/main/java/com/juick/service/UserService.java b/src/main/java/com/juick/service/UserService.java index 63b75110e..0d4efcfc0 100644 --- a/src/main/java/com/juick/service/UserService.java +++ b/src/main/java/com/juick/service/UserService.java @@ -20,10 +20,9 @@ package com.juick.service; import com.juick.Message; import com.juick.User; import com.juick.model.Auth; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; import javax.annotation.Nonnull; +import java.time.Instant; import java.util.Collection; import java.util.List; import java.util.Optional; @@ -41,12 +40,10 @@ public interface UserService { String getSignUpHashByTelegramID(Long telegramId, String username); - @CacheEvict(value = "users_by_name", allEntries = true) Optional<User> createUser(String username, String password); Optional<User> getUserByUID(int uid); - @Cacheable(value = "users_by_name") @Nonnull User getUserByName(String username); @Nonnull User getUserByEmail(String email); |