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

Auto-caching #69

Open
Selim042 opened this issue Oct 7, 2019 · 2 comments
Open

Auto-caching #69

Selim042 opened this issue Oct 7, 2019 · 2 comments

Comments

@Selim042
Copy link

Selim042 commented Oct 7, 2019

Are there plans to add auto-caching to this wrapper? I am looking at using this and would like to cache the results, but preferably not have my own wrappers that cache the results. I'd look into doing this myself, but I am not familiar with Kotlin.

@sargunv
Copy link
Member

sargunv commented May 6, 2020

This should be doable by adding a caching interceptor to the OkHttp client, like this: https://medium.com/@bapspatil/caching-with-retrofit-store-responses-offline-71439ed32fda

I'm not sure if I'll implement it, but I'd welcome a PR that adds this option.

@patrickdronk
Copy link

@Selim042 It does mean you need to rebuild your cache after every deploy. It would definitely be an improvement. But there is no way around it to sort your own persistent caching like redis/hazelcast

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

No branches or pull requests

3 participants