From 0854c9e76af2418db63aff9f7f061799f3d14027 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 20 Apr 2024 20:00:22 +0100 Subject: [PATCH] change cachecontrol for server previews to be lower --- .../java/xyz/mcutils/backend/controller/ServerController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/xyz/mcutils/backend/controller/ServerController.java b/src/main/java/xyz/mcutils/backend/controller/ServerController.java index a529721..0e150b1 100644 --- a/src/main/java/xyz/mcutils/backend/controller/ServerController.java +++ b/src/main/java/xyz/mcutils/backend/controller/ServerController.java @@ -67,7 +67,7 @@ public class ServerController { CachedMinecraftServer server = serverService.getServer(platform, hostname); return ResponseEntity.ok() - .cacheControl(CacheControl.maxAge(1, TimeUnit.HOURS).cachePublic()) + .cacheControl(CacheControl.maxAge(5, TimeUnit.MINUTES).cachePublic()) .contentType(MediaType.IMAGE_PNG) .header(HttpHeaders.CONTENT_DISPOSITION, dispositionHeader.formatted(hostname)) .body(serverService.getServerPreview(server, platform, size));