Skip to content

Commit

Permalink
fix: skip cache when pulling dynamic config (#625)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy authored Dec 9, 2024
1 parent 765e3a8 commit d8885c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

- Bugfix: Use latest dynamic config when queried, rather than the cached value from okhttp. (#625)

## 1.10.18

- Bugfix: Avoid level notification when hopping worlds with different profiles like Leagues. (#615)
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/dinkplugin/SettingsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import net.runelite.client.callback.ClientThread;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.events.ConfigChanged;
import okhttp3.CacheControl;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.HttpUrl;
Expand Down Expand Up @@ -412,7 +413,7 @@ private void importDynamicConfig(String url) {
return;
}

Request request = new Request.Builder().url(httpUrl).get().build();
Request request = new Request.Builder().url(httpUrl).cacheControl(CacheControl.FORCE_NETWORK).build();
httpClient.newCall(request).enqueue(new Callback() {
@Override
public void onResponse(@NotNull Call call, @NotNull Response response) {
Expand Down

0 comments on commit d8885c8

Please sign in to comment.