ReactQuery defaults and graphql newsfeed caching proposal
Ticket(s) / Related Merge Requests
Summary of Changes
In this proposed implementation I'm storing the first page of the feed on the cache, instead of using the react query persistence (Since it just writes the entire cache on every change)
Pros:
- The next time you open the app you are in the same place on the feed
- It shows data instantaneously
- More performant (we are not writing data to the storage all the time)
- We keep using react-query
- We keep using the custom mapping to models that save a lot of memory by directly replacing the memory cache of react-query with the models
Cons:
- It is not a real offline mode implementation
- If you open the app without connectivity only a few activities are available (we can increase this to a few pages)
Testing Considerations
- The newsfeed should work as usual
- After restarting it should show the same first page of the feed
Regression Scope
It affects the feed and the offline date of it
Platform Affected (web, mobile, etc)
both
Developer Testing Completed
Android
Screenshots
Does this impact
-
Localization -
Dark/light mode -
Guest mode