From b011fdbedea4996196d09362d20e72ffd815996a Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 10 Apr 2024 08:24:25 +0100 Subject: [PATCH] indicate that the server and player was not in the cache --- src/main/java/cc.fascinated/service/PlayerService.java | 1 + src/main/java/cc.fascinated/service/ServerService.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/cc.fascinated/service/PlayerService.java b/src/main/java/cc.fascinated/service/PlayerService.java index 8f5e5db..d50b6aa 100644 --- a/src/main/java/cc.fascinated/service/PlayerService.java +++ b/src/main/java/cc.fascinated/service/PlayerService.java @@ -68,6 +68,7 @@ public class PlayerService { ); playerCacheRepository.save(player); + player.setCached(-1); // Indicate that the player is not cached return player; } diff --git a/src/main/java/cc.fascinated/service/ServerService.java b/src/main/java/cc.fascinated/service/ServerService.java index 8a7ff32..014eb64 100644 --- a/src/main/java/cc.fascinated/service/ServerService.java +++ b/src/main/java/cc.fascinated/service/ServerService.java @@ -58,6 +58,7 @@ public class ServerService { platform.getPinger().ping(hostname, port), System.currentTimeMillis() ); + server.setCached(-1); // Indicate that the server is not cached serverCacheRepository.save(server); return server; }