Don't use caches

This commit is contained in:
libraryaddict 2020-04-24 17:06:17 +12:00
parent 88c9546a88
commit e7b2fa374b
No known key found for this signature in database
GPG Key ID: 052E4FBCD257AEA4

View File

@ -95,6 +95,7 @@ public class UpdateChecker {
URL url = new URL(urlString); URL url = new URL(urlString);
// Creating a connection // Creating a connection
HttpURLConnection con = (HttpURLConnection) url.openConnection(); HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setDefaultUseCaches(false);
// Get the input stream, what we receive // Get the input stream, what we receive
try (InputStream input = con.getInputStream()) { try (InputStream input = con.getInputStream()) {
@ -163,6 +164,7 @@ public class UpdateChecker {
URL url = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + resourceID); URL url = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + resourceID);
// Creating a connection // Creating a connection
HttpURLConnection con = (HttpURLConnection) url.openConnection(); HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setDefaultUseCaches(false);
// Get the input stream, what we receive // Get the input stream, what we receive
try (InputStream input = con.getInputStream()) { try (InputStream input = con.getInputStream()) {
@ -261,6 +263,7 @@ public class UpdateChecker {
URL url = new URL("https://ci.md-5.net/job/LibsDisguises/lastSuccessfulBuild/api/json"); URL url = new URL("https://ci.md-5.net/job/LibsDisguises/lastSuccessfulBuild/api/json");
// Creating a connection // Creating a connection
HttpURLConnection con = (HttpURLConnection) url.openConnection(); HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setDefaultUseCaches(false);
Map<String, Object> jsonObject; Map<String, Object> jsonObject;
// Get the input stream, what we receive // Get the input stream, what we receive