Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CacheMode 返回缓存结果问题 #127

Open
shengjunhu opened this issue Apr 12, 2024 · 0 comments
Open

CacheMode 返回缓存结果问题 #127

shengjunhu opened this issue Apr 12, 2024 · 0 comments

Comments

@shengjunhu
Copy link

1、配置
Kalle.setConfig(KalleConfig.newBuilder()
.connectFactory(OkHttpConnectFactory.newBuilder().build())
.cookieStore(DBCookieStore.newBuilder(ctx).build())
.cacheStore(DiskCacheStore.newBuilder(cache).build())
.network(new BroadcastNetwork(ctx))
.readTimeout(5, TimeUnit.SECONDS)
.connectionTimeout(5, TimeUnit.SECONDS)
.converter(new HttpConverter())
.build());
2、有网络执行网络请求,没有网络返回缓存,但是结果是失败,提示网络链接异常
Kalle.post(HttpConfig.URL_IMG)
.cacheKey(HttpConfig.URL_IMG)
.cacheMode(CacheMode.NETWORK_NO_THEN_READ_CACHE)
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant