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
callers of this will get two responses, like a stream of data where the first response is the cached response and the second response is the network response
Please review it and let me know if it meets your needs. Additionally, I've provided a recording of the implementation for your reference:
caching.screen.record.mp4
Approach:
Used SharedPreferences to store cache data persistently across sessions.
Utilized streams to send multiple responses from the function, ensuring that the first response is the cached data and the subsequent one is the fresh network data.
Updated the UI with StreamBuilder based on the data received from the stream, providing a seamless user experience.
This request caching service will be used to:
url
url
url
url
callers of this will get two responses, like a stream of data where the first response is the cached response and the second response is the network response
perhaps using this as a custom hook similar to https://tanstack.com/query/latest
The text was updated successfully, but these errors were encountered: