diff options
author | Vitaly Takmazov | 2022-12-24 03:28:02 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-24 04:12:58 +0300 |
commit | 36ebeb217326c6bc23dedfde1e028ae2286afe02 (patch) | |
tree | dcd0156bcabd3b1e92dd7da48a386975a34b676f /src/main/java/com/juick/SignatureManager.java | |
parent | 354988a7078a54bccf8afc8b49d3a178ae42789f (diff) |
Cacheable ActivityPub profiles
Diffstat (limited to 'src/main/java/com/juick/SignatureManager.java')
-rw-r--r-- | src/main/java/com/juick/SignatureManager.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/juick/SignatureManager.java b/src/main/java/com/juick/SignatureManager.java index 295909cc..8032a6fa 100644 --- a/src/main/java/com/juick/SignatureManager.java +++ b/src/main/java/com/juick/SignatureManager.java @@ -30,6 +30,7 @@ import com.juick.www.api.webfinger.model.Link; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.cache.annotation.Cacheable; import org.springframework.context.ApplicationEventPublisher; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; @@ -160,6 +161,7 @@ public class SignatureManager { return AnonymousUser.INSTANCE; } + @Cacheable("profiles") public Optional<Context> getContext(URI contextUri) { try { Context context = apClient.getForEntity(contextUri, Context.class).getBody(); |