From b08f5b104bdd98e2b422420479a1a962a4fb9d78 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 22 Jan 2023 20:57:17 +0300 Subject: twitter_user cache --- src/main/java/com/juick/service/UserService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/service/UserService.java b/src/main/java/com/juick/service/UserService.java index eeabf42e..05725b73 100644 --- a/src/main/java/com/juick/service/UserService.java +++ b/src/main/java/com/juick/service/UserService.java @@ -100,7 +100,7 @@ public interface UserService { List getUserFriends(int uid); List getUserBLUsers(int uid); - + @CacheEvict(value = "twitter_user", key="{ #user.getUid() }") boolean linkTwitterAccount(User user, String accessToken, String accessTokenSecret, String screenName); int getStatsMessages(int uid); @@ -127,6 +127,7 @@ public interface UserService { Optional getTwitterToken(int uid); + @CacheEvict(value = "twitter_user", key="{ #uid }") boolean deleteTwitterToken(Integer uid); void addFacebookState(String state, String redirectUri); @@ -146,6 +147,7 @@ public interface UserService { void disableFBCrosspost(Integer uid); @Nonnull + @Cacheable(value = "twitter_user") String getTwitterName(int uid); String getTelegramName(int uid); -- cgit v1.2.3