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

缓存只支持get请求吗,post不支持吗 #41

Closed
900326 opened this issue Nov 28, 2019 · 2 comments
Closed

缓存只支持get请求吗,post不支持吗 #41

900326 opened this issue Nov 28, 2019 · 2 comments

Comments

@900326
Copy link

900326 commented Nov 28, 2019

我使用post请求,断网后,在缓存有效期内,不显示数据,是不支持post请求吗

https://github.com/z-chu/RxCache
这个缓存库可以满足这个需求(有网络先加载缓存,再加载网络 #25),缓存策略也较全,但是使用麻烦,如果楼主可以结合他的缓存策略,保持你的库使用方式不变的情况就完美了,

@yale8848
Copy link
Owner

post理论上可以支持,但是不建议post缓存。
get通常是获取数据,我们缓存比较合理,post一般用于修改数据,不建议缓存数据。
谢谢你分享这个库,我后续再研究一下实现方式。

@900326
Copy link
Author

900326 commented Nov 28, 2019 via email

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

2 participants