Artemis icon indicating copy to clipboard operation
Artemis copied to clipboard

Caching individual instances for Lunar mode

Open RheingoldRiver opened this issue 1 year ago • 0 comments

In #87 I made a feature request for caching everything when the user cannot connect, but I wasn't properly thinking about how the fediverse works. Here's a better implementation.

Link to discord convo

When a user pulls to refresh, there are two cases for some content being missing

Case 1: It's the user's connection's fault

  • In this case, we should say something like "No connection detected, showing cached data only." as a persistent banner.
  • The cache should never disappear in this case because we don't want refreshing to be a destructive action.
    • Or I guess we could have an option in settings "clear current cache (note: may be destructive if you have no signal)" if this is super easy to do, but idt it's needed unless/until an actual user requests it

Case 2: One or more instances are down

  • In this case, we should still have a banner that says, "Cannot connect to one or more instances. See full list."
    • On the "See full list screen," the user can see a list of so-far-detected down instances (those with cache misses from pull-refresh or timeout AND the site is down)
    • There is UX by which the user can say "clear cache for this instance"
    • Also the user can say "clear cache for all instances"
    • Thus, the destructive action is hidden but available, so the user can choose to see fresh data from up instances only
  • There should also be a user preference to auto-clear instance cache in some amount of time (configurable via two dropdown menus, X time, and time unit (minutes/hours/days/months)). I think a sensible default is 3 months. This basically means there is no destructive action auto happening until an instance is basically dead, but if anyone disagrees we can discuss this.

RheingoldRiver avatar Jul 05 '23 10:07 RheingoldRiver