aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service/CrosspostService.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-08-05 10:49:20 +0300
committerGravatar Vitaly Takmazov2019-08-05 10:49:20 +0300
commit17578516fe0978602ddfac56055cfb1d1b2e0121 (patch)
tree6573d8fcf9b24294952817f9771399e2faa6c9dd /src/main/java/com/juick/service/CrosspostService.java
parent82cbd49555a723f91ed3684a64debeade9c0b3f8 (diff)
Evict caches on user changes, fix tests
Diffstat (limited to 'src/main/java/com/juick/service/CrosspostService.java')
-rw-r--r--src/main/java/com/juick/service/CrosspostService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/CrosspostService.java b/src/main/java/com/juick/service/CrosspostService.java
index 28b9e8ab..a8e66a68 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);
}