Ensure the skin part cache uses lowercase
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m27s

This commit is contained in:
Braydon 2024-04-10 07:40:23 -04:00
parent 81029a57a1
commit 33d1f9669a

@ -178,7 +178,7 @@ public final class MojangService {
size = DEFAULT_PART_TEXTURE_SIZE; size = DEFAULT_PART_TEXTURE_SIZE;
} }
size = Math.min(size, MAX_PART_TEXTURE_SIZE); // Limit the size to 512 size = Math.min(size, MAX_PART_TEXTURE_SIZE); // Limit the size to 512
String id = "%s-%s-%s-%s".formatted(query, part.name(), size, extension); // The id of the skin part String id = "%s-%s-%s-%s".formatted(query.toLowerCase(), part.name(), size, extension); // The id of the skin part
Optional<CachedSkinPartTexture> cached = skinPartTextureCache.findById(id); // Get the cached texture Optional<CachedSkinPartTexture> cached = skinPartTextureCache.findById(id); // Get the cached texture
if (cached.isPresent()) { // Respond with the cache if present if (cached.isPresent()) { // Respond with the cache if present