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 Apr 11, 2023. It is now read-only.
I might be missing something, but having trouble getting collections to load from localstorage. When I implement dualstorage and run fetch on a collection - the data is fetched from the remote server and saved into localstorage - as expected. But when I refresh the page, the API request is made again - instead of the data getting retrieved from localstorage. When I turn off wifi and refresh, the data is retrieved from localstorage correctly, even though it still makes a failed API request.
Is this the correct behavior for dualstorage?
The text was updated successfully, but these errors were encountered:
We've toyed around with this idea before, but at least the way it was implemented, there was a pretty decent performance penalty - see #16.
What I did to achieve the behavior you're looking for was create a local method in my collection that returns true during my initial fetch, so that I can get local data immediately if it is available, and then fetch again to pull from the remote as usual.
I'm open to ideas about how to better approach this.
I might be missing something, but having trouble getting collections to load from localstorage. When I implement dualstorage and run fetch on a collection - the data is fetched from the remote server and saved into localstorage - as expected. But when I refresh the page, the API request is made again - instead of the data getting retrieved from localstorage. When I turn off wifi and refresh, the data is retrieved from localstorage correctly, even though it still makes a failed API request.
Is this the correct behavior for dualstorage?
The text was updated successfully, but these errors were encountered: