0

I am using Ion (Android Asynchronous Networking and Image Loading) to fetch json data stored in gist.github.com. Whenever I add new data to the JSON file in github and restart the android app, the new data is not loaded but when I clear the cache of the app and restart the app, new data is loaded. I am unable to solve the caching problem here. I think the networking library is caching the JSON file. Please help.

Here is the code snippet:

Ion.with(context)
.load("https://gist.github.com/<username>/<gistId>/raw/data.json")
.asJsonObject()
.setCallback(new FutureCallback<JsonObject>() {
@Override
public void onCompleted(Exception e, JsonObject result) {
    // Do something
 }
});

Thankyou

Hemant Parmar
  • 3,924
  • 7
  • 25
  • 49

1 Answers1

0

use .noCache() to bypass caches.

salmanseifian
  • 1,082
  • 3
  • 9
  • 26