use of com.android.okhttp.HttpResponseCache in project robovm by robovm.
the class URLConnectionTest method initResponseCache.
private void initResponseCache() throws IOException {
String tmp = System.getProperty("java.io.tmpdir");
File cacheDir = new File(tmp, "HttpCache-" + UUID.randomUUID());
cache = new HttpResponseCache(cacheDir, Integer.MAX_VALUE);
ResponseCache.setDefault(cache);
}
Aggregations