Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Channel cache #229

Open
mayo opened this issue Sep 14, 2018 · 3 comments
Open

Channel cache #229

mayo opened this issue Sep 14, 2018 · 3 comments

Comments

@mayo
Copy link

mayo commented Sep 14, 2018

I don't know the exact steps to get into this state, but I did something along the lines of:

  1. Connect to a microsub server (https://domain1.com/microsub)
  2. Load list of channels
  3. Shut down server, replace the software, etc.
  4. Go to channel list and pull down to reload

Result: I now see the channel list from both servers, even though the original server is long dead, and the new one has different channels. One of the old channels even shows 9 unread messages. Tapping on that channel shows zero messages inside. Tapping on "Load Mode Posts" shows "No More Posts".

Expected: I would expect the old channels to disappear, because the channel list at https://domain1.com/microsub no longer contains them, or at least ability to clear cache.

@EdwardHinkle
Copy link
Collaborator

Hi @mayo This issue and #224 are not likely the same. This issue is related to #197. When I built in the channel cache-ing I somehow missed the need to erase all previous channels when logging out of a Microsub account. So those channels are kind of zombie channels still hanging around but the new server doesn't know anything about them.

Essentially when I'm pulling in the channels list, if channels don't appear on it anymore, I should remove them from the cache. Also, if you log out it should remove all existing channels.

Thanks for bringing this issue up. Definitely should get fixed in the version that I'm working on currently. For the time being, if you delete the app and re-download it, it will clear out the channels cache so it doesn't drive you crazy.

@mayo
Copy link
Author

mayo commented Sep 14, 2018

@EdwardHinkle Ha! I didn't even think of logging out in between. I just continued using the account that was already logged in (but you're right, logging out doesn't clear them either).

I didn't mean to imply #224 was the same, just wondering if it had to do with caching. But you'd know better, I barely spent any time looking at the code so far!

@EdwardHinkle
Copy link
Collaborator

Ohhhhh, interesting! That makes sense.

I'm thinking #224 probably isn't caching because the caching works great for adding new channels (I do it all the time) it's just clearing out the old ones that has lots of bugs :) But it was a great idea!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants