Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data caching #4

Open
ghost opened this issue Jul 24, 2022 · 0 comments
Open

Data caching #4

ghost opened this issue Jul 24, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jul 24, 2022

Should data be cached for when there is no connection? Something like the hive dart pub package could be used for this.

Some things that could be cached:

  • Profile data (bio, username, display name, etc.).
  • A couple of your recently seen posts from the feed (trending & recents).
  • The daily hottest posts.
  • The list of users you've previously messaged & a few of your recent messages with them.

This could be implemented by checking if you are connected to the internet or not (via the already added connection checker dart pub package. Then, if you are connected, load data from the server. If not, load it from the cache. Data received from the server would also be immediately cached.

An example of an app that does caching like this is Instagram. However, on the other hand, other apps don't. Reddit has basically no data persisted if you're offline (all you get are error messages).

@ghost ghost added the enhancement New feature or request label Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

0 participants