Retrofit - Okhttp client How to cache the response
I'm trying to cache the response of http calls done by Retrofit(v 1.9.0) with OkHttp(2.3.0). It always made the network calls if I try to make a call without internet then java.net.UnknownHostException . RestClient public class RestClient { public static final String BASE_URL = "http://something.example.net/JSONService"; private com.ucc.application.rest.ApiService apiService; public RestClient() { Gson gson = new GsonBuilder() .setDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'") .create(); RequestInterceptor requestInterceptor = new RequestInterceptor() { @Override public void intercept