diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/juick/service/UserService.java | 4 | ||||
-rw-r--r-- | src/main/resources/application.properties | 2 |
2 files changed, 4 insertions, 2 deletions
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<User> getUserFriends(int uid); List<User> 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<ExternalToken> 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); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 16da22e6..ecea6a79 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -8,7 +8,7 @@ spring.datasource.generate-unique-name=false spring.flyway.locations=classpath:db/migration,classpath:db/specific/{vendor} spring.sql.init.platform=h2 spring.cache.type=simple -spring.cache.cache-names=help, usernames, users_by_name, discover, discussions, messages, replies, popular_tags, profiles +spring.cache.cache-names=help, usernames, users_by_name, discover, discussions, messages, replies, popular_tags, profiles, twitter_user spring.profiles.active=@activatedProperties@ springdoc.swagger-ui.path=/api/swagger-ui.html server.forward-headers-strategy=framework |