fix(backend): fix avatar url cache invalidation

we don't really need to store the fallback anyways
This commit is contained in:
MiniDigger | Martin 2023-01-01 21:42:18 +01:00
parent 27846b8282
commit 59e2fd5170

View File

@ -131,7 +131,7 @@ public class AvatarService extends HangarComponent {
return "https://docs.papermc.io/img/paper.png";
}
return this.cache.get(type + "-" + subject + "-" + defaultType + "-" + defaultSubject, (key) -> {
return this.cache.get(type + "-" + subject, (key) -> {
try {
return this.restTemplate.getForObject(this.config.security.api().url() + "/avatar/" + type + "/" + subject + (defaultType != null && defaultSubject != null ? "/" + defaultType + "/" + defaultSubject : "") + "?apiKey=" + this.config.sso.apiKey(), String.class);
} catch (final HttpStatusCodeException ex) {