This repository has been archived by the owner on Dec 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 305
Get data always hits the network without persister #364
Comments
Hi sad to hear you are having issue. We have a test that covers the above use case https://github.com/NYTimes/Store/blob/46e0b7fd5aeaaffe66d76ab1c88bb9e4c6872bd3/store/src/test/java/com/nytimes/android/external/store3/StoreTest.java#L73 One reason that the memory cache would be skipped is if the equality check fails. Is it possible that you are not implementing equals/hashCode in your data class? |
I had not implemented equals/hashCode as you said, now that I did it, it still doesn't work. I've even changed the API endpoint to receive a simple |
Create a sample project and I'd be happy to take a look |
mapacheverdugo
changed the title
Get data always hits the network
Get data always hits the network without a persister
Aug 27, 2018
mapacheverdugo
changed the title
Get data always hits the network without a persister
Get data always hits the network without persister
Aug 27, 2018
so sorry for not replying for this long, your link is not active I can take a look if you update |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
First of all, I'm still using Java and I'm really noob with RxJava.
I'm trying to retrieve data from a localhosted API, but when I call
get()
it always hits the network, even when I've previously called the method.I've been trying many examples, but the problem persists and I don't know what I'm doing wrong. If you could give me an example of the simplest way to make it work, I would appreciate it very much. Here is my current code:
The text was updated successfully, but these errors were encountered: