Open tmxd09887 opened 6 years ago
okhttp3.Response response = OkGo.get(testUrl)// .tag(this)// .cacheMode(CacheMode.FIRST_CACHE_THEN_REQUEST) .cacheKey(testUrl) .cacheTime(3600 * 3) .execute();
List<CacheEntity<?>> all = CacheManager.getInstance().getAll();
查了缓存不存在
谢谢
还有一个问题,这种同步方式下不能捕捉错误信息吗?如果出错了,能否打印出错误信息。
比如onerror
okhttp3.Response response = OkGo.get(testUrl)// .tag(this)// .cacheMode(CacheMode.FIRST_CACHE_THEN_REQUEST) .cacheKey(testUrl) .cacheTime(3600 * 3) .execute();
List<CacheEntity<?>> all = CacheManager.getInstance().getAll();
查了缓存不存在
谢谢