aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/service
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-06-26 08:30:46 +0300
committerGravatar Vitaly Takmazov2023-06-26 09:37:31 +0300
commit714779c719894a07156964f66591352498a4597b (patch)
treed3140768b1000941d86f8768db3a0c16333151d1 /src/main/java/com/juick/service
parent26ce11f610eff622c7949bdd4eeee75c5be9f3d9 (diff)
ActivityPub: cache all profile exception paths
Diffstat (limited to 'src/main/java/com/juick/service')
-rw-r--r--src/main/java/com/juick/service/ActivityPubService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/service/ActivityPubService.java b/src/main/java/com/juick/service/ActivityPubService.java
index 3f56c40c..c2d3f1e7 100644
--- a/src/main/java/com/juick/service/ActivityPubService.java
+++ b/src/main/java/com/juick/service/ActivityPubService.java
@@ -127,7 +127,7 @@ public class ActivityPubService extends BaseJdbcService implements SocialService
getJdbcTemplate().update("DELETE FROM followers WHERE acct=?", acct);
}
- @Cacheable("profiles")
+ @Cacheable(value = "profiles", key="#contextUri")
public Optional<Context> get(URI contextUri) {
Instant now = Instant.now();
String requestDate = DateFormattersHolder.getHttpDateFormatter().format(now);
@@ -150,7 +150,7 @@ public class ActivityPubService extends BaseJdbcService implements SocialService
return Optional.of(context);
}
}
- } catch (IOException e) {
+ } catch (Exception e) {
logger.warn("HTTP Signature exception reading {}: {}", contextUri.toASCIIString(), e.getMessage());
}
return Optional.empty();