You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.
At first access, my database has no entries. So I return RecordState.MISSING.
I expect the store to make a request in that case. But instead it calls my persister (which returns an empty list as there are no entries yet) and delivers the empty list.
The text was updated successfully, but these errors were encountered:
You're right it's not working as expected, seems like stale is being handled correctly but not missing. I'll take a look tonight. Thank you for reporting.
It looks like an appropriate way to handle this could be by returning Maybe.empty() from RealInternalStore#disk when the persister is a RecordProvider with RecordState.MISSING -- this would trigger the store to switch to fetch() before calling the persister.
We could add a helper method for this to the StoreUtil class, similar to the existing method for determining if the persister is stale.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I tried to implement the persister.
At first access, my database has no entries. So I return
RecordState.MISSING
.I expect the store to make a request in that case. But instead it calls my persister (which returns an empty list as there are no entries yet) and delivers the empty list.
The text was updated successfully, but these errors were encountered: