gpt4 book ai didi

Android Retrofit POST 请求缓存

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:01:33 25 4
gpt4 key购买 nike

存储 retrofit POST 请求缓存的最佳方式是什么?

我将存储响应并在用户离线时使用该响应。我被推荐了这个链接。
1) Can Retrofit with OKHttp use cache data when offline
2) Cache POST requests with OkHttp

但是在这个链接缓存机制中只工作GET方法。
- 可以使用改造在 post 请求中存储缓存吗?
- 是否有处理网络缓存的库?

谢谢

最佳答案

OkHttp 支持文件缓存

关于Android Retrofit POST 请求缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39040784/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com