I'm using RxCache on my Android project and I have a problem when the user has no internet connection.
Is there a way to prevent an observable from getting evicted if no data is returned from the server?
For example, each time the user refreshes a news feed (pull to refresh) getRepository().getFeedPosts(tag, new EvictProvider(true)); gets called.
If the user suddently loses his connection to the internet and refreshes the feed again, no data gets returned from the server, the observable gets evicted and it returns the cached version (since I'm setting useExpiredDataIfLoaderNotAvailable(true) on the RxCache builder).
Again with no internet connection, if the user refreshes a second time, no cached data is available.
Is there a way to prevent that from happening?
Thanks