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

What is the best practices to do a network call every hour ? #13

Open
ipragmatechadmin opened this issue Jul 14, 2015 · 1 comment
Open
Labels

Comments

@ipragmatechadmin
Copy link

I have used the AsyncService for the network calls which cache that data. Now I wanted to call this network service every hour and keep it in the cache so that if there is no network then data can be picked from the cache. What's the best practice to implement this solution ?

@JoanZapata
Copy link
Owner

There's nothing in AsyncService to help you call some code every hour, so you should implement it yourself using something like the android AlarmManager, and call your AsyncService from it. If you used @CacheThenCall, the result will be cached.

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

No branches or pull requests

2 participants