Is Retrofit+Okhttp using httpCaching as a default in Android?
问题 I use retrofit and okhttp in one of our applications. I can't really find a good explanation for the default behaviour of Retrofit. If Okhttp is on the class path it will be automatically used. But as far as I can see it the default HttpResponseCache is null. Do I need to explicitly enable caching with Retrofit and Okhttp? 回答1: You should manually create your OkHttpClient and configure it how you like. In this case you should install a cache. Once you have that create an OkClient and pass it